Examples of forceMerge()


Examples of org.apache.lucene.index.RandomIndexWriter.forceMerge()

    }
    if (!doMultiSegment) {
      if (VERBOSE) {
        System.out.println("TEST: setUp full merge");
      }
      iw.forceMerge(1);
    }
    iw.close();
    if (VERBOSE) {
      System.out.println("TEST: setUp done close");
    }
View Full Code Here

Examples of org.apache.lucene.index.RandomIndexWriter.forceMerge()

      iw1.w.updateNumericDocValue(new Term("s", term), "ndv", value);
      iw2.w.updateNumericDocValue(new Term("s", term), "ndv", value);
    }
   
    iw1.forceMerge(1);
    iw2.forceMerge(1);
    iw1.close();
    iw2.close();
    reader = DirectoryReader.open(dir1);
    sortedReader = DirectoryReader.open(dir2);
  }
View Full Code Here

Examples of org.apache.lucene.index.RandomIndexWriter.forceMerge()

    writer.addDocument (doc);

    // tests here require single segment (eg try seed
    // 8239472272678419952L), because SingleDocTestFilter(x)
    // blindly accepts that docID in any sub-segment
    writer.forceMerge(1);

    reader = writer.getReader();
    writer.close ();

    searcher = newSearcher(reader);
View Full Code Here

Examples of org.apache.lucene.index.RandomIndexWriter.forceMerge()

      d = newDirectory();
      RandomIndexWriter w = new RandomIndexWriter(random(), d);
      Document doc = new Document();
      doc.add(newField("ints", "1", StringField.TYPE_NOT_STORED));
      w.addDocument(doc);
      w.forceMerge(1);
      r = w.getReader();
      w.close();

      subR = r.leaves().get(0).reader();
    }
View Full Code Here

Examples of org.apache.lucene.index.RandomIndexWriter.forceMerge()

    if (random().nextBoolean()) {
      if (VERBOSE) {
        System.out.println("TEST: forceMerge(1)...");
      }
      w.forceMerge(1);
    }
    IndexReader r = w.getReader();
    w.close();

    final SortedSetDocValuesReaderState sortedSetDVState;
View Full Code Here

Examples of org.apache.lucene.index.RandomIndexWriter.forceMerge()

      }
      doc.add(newStringField("field" + i, "content1", Field.Store.YES));
      w.addDocument(doc)
    }
   
    w.forceMerge(1);
    IndexReader reader = w.getReader();
    w.close();
    assertEquals(1, reader.leaves().size());
   
   
View Full Code Here

Examples of org.apache.lucene.index.RandomIndexWriter.forceMerge()

          terms.add(t);
          break;
        }
      }
    }
    w.forceMerge(1);
    IndexReader reader = w.getReader();
    w.close();
    assertEquals(1, reader.leaves().size());
    AtomicReaderContext context = reader.leaves().get(0);
    TermsFilter tf = new TermsFilter(new ArrayList<Term>(terms));
View Full Code Here

Examples of org.apache.lucene.index.RandomIndexWriter.forceMerge()

    if (random().nextBoolean()) {
      if (VERBOSE) {
        System.out.println("TEST: forceMerge(1)...");
      }
      w.forceMerge(1);
    }
    IndexReader r = w.getReader();

    final SortedSetDocValuesReaderState sortedSetDVState;
    IndexSearcher s = newSearcher(r);
View Full Code Here

Examples of org.apache.lucene.index.RandomIndexWriter.forceMerge()

    writer.addDocument(doc);
    writer.addDocument(doc);
    writer.addDocument(doc);

    // Test wants 3 docs in one segment:
    writer.forceMerge(1);

    final ValueSource vs = new ValueSource() {
        @SuppressWarnings("rawtypes")
        @Override
        public FunctionValues getValues(Map ignored, AtomicReaderContext ignored2) {
View Full Code Here

Examples of org.apache.lucene.index.RandomIndexWriter.forceMerge()

    writer.addDocument (doc);

    // tests here require single segment (eg try seed
    // 8239472272678419952L), because SingleDocTestFilter(x)
    // blindly accepts that docID in any sub-segment
    writer.forceMerge(1);

    reader = writer.getReader();
    writer.close ();

    searcher = newSearcher(reader);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.