/lucene-3.6.0/lucene/core/src/test/org/apache/lucene/index/ |
H A D | TestSizeBoundedForceMerge.java | 29 private void addDocs(IndexWriter writer, int numDocs) throws IOException { argument 32 writer.addDocument(doc); 34 writer.commit(); 52 IndexWriter writer = new IndexWriter(dir, conf); 56 addDocs(writer, numDocs); 58 writer.close(); 69 writer = new IndexWriter(dir, conf); 70 writer.forceMerge(1); 71 writer.close(); 85 IndexWriter writer [all...] |
H A D | TestIndexWriterMergePolicy.java | 36 IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig( 41 addDoc(writer); 42 checkInvariants(writer); 45 writer.close(); 53 IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig( 59 addDoc(writer); 60 checkInvariants(writer); 61 if (writer.getNumBufferedDocuments() + writer.getSegmentCount() >= 18) { 67 writer 221 addDoc(IndexWriter writer) argument 227 checkInvariants(IndexWriter writer) argument [all...] |
H A D | TestIsCurrent.java | 32 private RandomIndexWriter writer; field in class:TestIsCurrent 42 writer = new RandomIndexWriter(random, directory); 47 writer.addDocument(doc); 48 writer.commit(); 54 writer.close(); 67 IndexReader reader = writer.getReader(); 70 assertEquals("One document should be in the index", 1, writer.numDocs()); 75 writer.deleteDocuments(idTerm); 76 writer.commit(); 79 assertEquals("Document should be removed", 0, writer [all...] |
H A D | TestNewestSegment.java | 28 IndexWriter writer = new IndexWriter(directory, newIndexWriterConfig( TEST_VERSION_CURRENT, new MockAnalyzer(random))); 29 assertNull(writer.newestSegment()); 30 writer.close();
|
H A D | TestCrash.java | 40 IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig( 44 ((ConcurrentMergeScheduler) writer.getConfig().getMergeScheduler()).setSuppressExceptions(); 46 writer.commit(); 53 writer.addDocument(doc); 55 return writer; 58 private void crash(final IndexWriter writer) throws IOException { argument 59 final MockDirectoryWrapper dir = (MockDirectoryWrapper) writer.getDirectory(); 60 ConcurrentMergeScheduler cms = (ConcurrentMergeScheduler) writer.getConfig().getMergeScheduler(); 71 IndexWriter writer = initIndex(random, true); 72 Directory dir = writer [all...] |
H A D | TestIndexWriterForceMerge.java | 44 IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig( 49 writer.addDocument(doc); 50 writer.close(); 58 writer = new IndexWriter(dir, newIndexWriterConfig( TEST_VERSION_CURRENT, 60 writer.forceMerge(3); 61 writer.close(); 84 IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig( 90 writer.addDocument(doc); 92 writer.commit(); 93 writer [all...] |
H A D | TestSnapshotDeletionPolicy.java | 72 IndexWriter writer, int numSnapshots, String snapshotPrefix) 76 writer.addDocument(new Document()); 77 writer.commit(); 110 final IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig( 113 writer.commit(); 123 writer.addDocument(doc); 130 writer.commit(); 156 // Add one more document to force writer to commit a 161 writer.addDocument(doc); 165 writer 71 prepareIndexAndSnapshots(SnapshotDeletionPolicy sdp, IndexWriter writer, int numSnapshots, String snapshotPrefix) argument [all...] |
H A D | TestSegmentTermEnum.java | 47 IndexWriter writer = null; 49 writer = new IndexWriter(dir, newIndexWriterConfig( TEST_VERSION_CURRENT, new MockAnalyzer(random))); 55 addDoc(writer, "aaa"); 56 addDoc(writer, "aaa bbb"); 59 writer.close(); 65 writer = new IndexWriter(dir, newIndexWriterConfig( TEST_VERSION_CURRENT, new MockAnalyzer(random)).setOpenMode(OpenMode.APPEND)); 66 writer.forceMerge(1); 67 writer.close(); 75 IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random))); 76 addDoc(writer, "aa 126 addDoc(IndexWriter writer, String value) argument [all...] |
/lucene-3.6.0/lucene/backwards/src/test/org/apache/lucene/index/ |
H A D | TestSizeBoundedForceMerge.java | 29 private void addDocs(IndexWriter writer, int numDocs) throws IOException { argument 32 writer.addDocument(doc); 34 writer.commit(); 52 IndexWriter writer = new IndexWriter(dir, conf); 56 addDocs(writer, numDocs); 58 writer.close(); 69 writer = new IndexWriter(dir, conf); 70 writer.forceMerge(1); 71 writer.close(); 85 IndexWriter writer [all...] |
H A D | TestIndexWriterMergePolicy.java | 36 IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig( 41 addDoc(writer); 42 checkInvariants(writer); 45 writer.close(); 53 IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig( 59 addDoc(writer); 60 checkInvariants(writer); 61 if (writer.getNumBufferedDocuments() + writer.getSegmentCount() >= 18) { 67 writer 221 addDoc(IndexWriter writer) argument 227 checkInvariants(IndexWriter writer) argument [all...] |
H A D | TestIsCurrent.java | 32 private RandomIndexWriter writer; field in class:TestIsCurrent 42 writer = new RandomIndexWriter(random, directory); 47 writer.addDocument(doc); 48 writer.commit(); 54 writer.close(); 67 IndexReader reader = writer.getReader(); 70 assertEquals("One document should be in the index", 1, writer.numDocs()); 75 writer.deleteDocuments(idTerm); 76 writer.commit(); 79 assertEquals("Document should be removed", 0, writer [all...] |
H A D | TestNewestSegment.java | 28 IndexWriter writer = new IndexWriter(directory, newIndexWriterConfig( TEST_VERSION_CURRENT, new MockAnalyzer(random))); 29 assertNull(writer.newestSegment()); 30 writer.close();
|
H A D | TestCrash.java | 40 IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig( 44 ((ConcurrentMergeScheduler) writer.getConfig().getMergeScheduler()).setSuppressExceptions(); 46 writer.commit(); 53 writer.addDocument(doc); 55 return writer; 58 private void crash(final IndexWriter writer) throws IOException { argument 59 final MockDirectoryWrapper dir = (MockDirectoryWrapper) writer.getDirectory(); 60 ConcurrentMergeScheduler cms = (ConcurrentMergeScheduler) writer.getConfig().getMergeScheduler(); 71 IndexWriter writer = initIndex(random, true); 72 Directory dir = writer [all...] |
H A D | TestIndexWriterForceMerge.java | 44 IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig( 49 writer.addDocument(doc); 50 writer.close(); 58 writer = new IndexWriter(dir, newIndexWriterConfig( TEST_VERSION_CURRENT, 60 writer.forceMerge(3); 61 writer.close(); 84 IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig( 90 writer.addDocument(doc); 92 writer.commit(); 93 writer [all...] |
H A D | TestSnapshotDeletionPolicy.java | 72 IndexWriter writer, int numSnapshots, String snapshotPrefix) 76 writer.addDocument(new Document()); 77 writer.commit(); 110 final IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig( 113 writer.commit(); 123 writer.addDocument(doc); 130 writer.commit(); 156 // Add one more document to force writer to commit a 161 writer.addDocument(doc); 165 writer 71 prepareIndexAndSnapshots(SnapshotDeletionPolicy sdp, IndexWriter writer, int numSnapshots, String snapshotPrefix) argument [all...] |
H A D | TestSegmentTermEnum.java | 47 IndexWriter writer = null; 49 writer = new IndexWriter(dir, newIndexWriterConfig( TEST_VERSION_CURRENT, new MockAnalyzer(random))); 55 addDoc(writer, "aaa"); 56 addDoc(writer, "aaa bbb"); 59 writer.close(); 65 writer = new IndexWriter(dir, newIndexWriterConfig( TEST_VERSION_CURRENT, new MockAnalyzer(random)).setOpenMode(OpenMode.APPEND)); 66 writer.forceMerge(1); 67 writer.close(); 75 IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random))); 76 addDoc(writer, "aa 126 addDoc(IndexWriter writer, String value) argument [all...] |
/lucene-3.6.0/solr/solrj/src/java/org/apache/noggit/ |
H A D | TextSerializer.java | 26 public void serialize(TextWriter writer, Map val) { argument 27 writer.startObject(); 33 writer.writeValueSeparator(); 35 writer.writeString(entry.getKey().toString()); 36 writer.writeNameSeparator(); 37 serialize(writer, entry.getValue()); 39 writer.endObject(); 42 public void serialize(TextWriter writer, Collection val) { argument 43 writer.startArray(); 49 writer 56 serialize(TextWriter writer, Object o) argument [all...] |
/lucene-3.6.0/solr/core/src/java/org/apache/solr/response/ |
H A D | PHPResponseWriter.java | 33 public void write(Writer writer, SolrQueryRequest req, SolrQueryResponse rsp) throws IOException { argument 34 PHPWriter w = new PHPWriter(writer, req, rsp); 48 public PHPWriter(Writer writer, SolrQueryRequest req, SolrQueryResponse rsp) { argument 49 super(writer, req, rsp); 59 writer.write("array("); 64 writer.write(')'); 69 writer.write("array("); 74 writer.write(')'); 79 writer.write("null"); 85 writer [all...] |
H A D | RubyResponseWriter.java | 32 public void write(Writer writer, SolrQueryRequest req, SolrQueryResponse rsp) throws IOException { argument 33 RubyWriter w = new RubyWriter(writer, req, rsp); 53 public RubyWriter(Writer writer, SolrQueryRequest req, SolrQueryResponse rsp) { argument 54 super(writer, req, rsp); 59 writer.write("nil"); 65 writer.write('='); 66 writer.write('>'); 77 writer.write('\''); 82 writer.write('\\'); 84 writer [all...] |
/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/index/ |
H A D | SerialMergeScheduler.java | 30 synchronized public void merge(IndexWriter writer) argument 34 MergePolicy.OneMerge merge = writer.getNextMerge(); 37 writer.merge(merge);
|
/lucene-3.6.0/lucene/contrib/spatial/src/test/org/apache/lucene/spatial/tier/ |
H A D | TestDistance.java | 42 private IndexWriter writer; field in class:TestDistance 48 writer = new IndexWriter(directory, newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random))); 49 addData(writer); 55 writer.close(); 60 private void addPoint(IndexWriter writer, String name, double lat, double lng) throws IOException{ argument 72 writer.addDocument(doc); 77 private void addData(IndexWriter writer) throws IOException { argument 78 addPoint(writer,"McCormick & Schmick's Seafood Restaurant",38.9579000,-77.3572000); 79 addPoint(writer,"Jimmy's Old Town Tavern",38.9690000,-77.3862000); 80 addPoint(writer,"Ne [all...] |
/lucene-3.6.0/solr/core/src/test/org/apache/solr/update/ |
H A D | DummyMergePolicy.java | 31 public DummyMergePolicy(IndexWriter writer) { argument 33 setIndexWriter(writer);
|
/lucene-3.6.0/lucene/core/src/test/org/apache/lucene/ |
H A D | TestMergeSchedulerExternal.java | 50 public MyMergeThread(IndexWriter writer, MergePolicy.OneMerge merge) throws IOException { argument 51 super(writer, merge); 57 protected MergeThread getMergeThread(IndexWriter writer, MergePolicy.OneMerge merge) throws IOException { argument 58 MergeThread thread = new MyMergeThread(writer, merge); 96 IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig( 100 LogMergePolicy logMP = (LogMergePolicy) writer.getConfig().getMergePolicy(); 103 writer.addDocument(doc); 105 ((MyMergeScheduler) writer.getConfig().getMergeScheduler()).sync(); 106 writer.close(); 117 public void merge(IndexWriter writer) throw argument [all...] |
/lucene-3.6.0/lucene/backwards/src/test/org/apache/lucene/ |
H A D | TestMergeSchedulerExternal.java | 50 public MyMergeThread(IndexWriter writer, MergePolicy.OneMerge merge) throws IOException { argument 51 super(writer, merge); 57 protected MergeThread getMergeThread(IndexWriter writer, MergePolicy.OneMerge merge) throws IOException { argument 58 MergeThread thread = new MyMergeThread(writer, merge); 96 IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig( 100 LogMergePolicy logMP = (LogMergePolicy) writer.getConfig().getMergePolicy(); 103 writer.addDocument(doc); 105 ((MyMergeScheduler) writer.getConfig().getMergeScheduler()).sync(); 106 writer.close(); 117 public void merge(IndexWriter writer) throw argument [all...] |
/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/search/ |
H A D | NRTManager.java | 74 private final TrackingIndexWriter writer; field in class:NRTManager 85 * @param writer TrackingIndexWriter to open near-real-time 91 public NRTManager(TrackingIndexWriter writer, SearcherFactory searcherFactory) throws IOException { argument 92 this(writer, searcherFactory, true); 102 public NRTManager(TrackingIndexWriter writer, SearcherFactory searcherFactory, boolean applyAllDeletes) throws IOException { argument 103 this.writer = writer; 108 current = SearcherManager.getSearcher(searcherFactory, IndexReader.open(writer.getIndexWriter(), applyAllDeletes)); 150 private final IndexWriter writer; field in class:NRTManager.TrackingIndexWriter 153 public TrackingIndexWriter(IndexWriter writer) { argument [all...] |