Examples of Lucene41PostingsFormat


Examples of org.apache.lucene.codecs.lucene41.Lucene41PostingsFormat

    counter = 0;
  }

  public void testSimpleSkip() throws IOException {
    Directory dir = new CountingRAMDirectory(new RAMDirectory());
    IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig( TEST_VERSION_CURRENT, new PayloadAnalyzer()).setCodec(TestUtil.alwaysPostingsFormat(new Lucene41PostingsFormat())).setMergePolicy(newLogMergePolicy()));
    Term term = new Term("test", "a");
    for (int i = 0; i < 5000; i++) {
      Document d1 = new Document();
      d1.add(newTextField(term.field(), term.text(), Field.Store.NO));
      writer.addDocument(d1);
View Full Code Here

Examples of org.apache.lucene.codecs.lucene41.Lucene41PostingsFormat

    }
  }
 
  public TestBloomFilteredLucene41Postings() {
    super("TestBloomFilteredLucene41Postings");
    delegate = new BloomFilteringPostingsFormat(new Lucene41PostingsFormat(),
        new LowMemoryBloomFactory());
  }
View Full Code Here

Examples of org.apache.lucene.codecs.lucene41.Lucene41PostingsFormat

    }
   
    Directory ramdir = new RAMDirectory();
    Analyzer analyzer = randomAnalyzer();
    IndexWriter writer = new IndexWriter(ramdir,
                                         new IndexWriterConfig(TEST_VERSION_CURRENT, analyzer).setCodec(TestUtil.alwaysPostingsFormat(new Lucene41PostingsFormat())));
    Document doc = new Document();
    Field field1 = newTextField("foo", fooField.toString(), Field.Store.NO);
    Field field2 = newTextField("term", termField.toString(), Field.Store.NO);
    doc.add(field1);
    doc.add(field2);
View Full Code Here

Examples of org.apache.lucene.codecs.lucene41.Lucene41PostingsFormat

    int minItemsPerBlock = TestUtil.nextInt(random, 2, 100);
    int maxItemsPerBlock = 2*(Math.max(2, minItemsPerBlock-1)) + random.nextInt(100);
    int lowFreqCutoff = TestUtil.nextInt(random, 2, 100);

    add(avoidCodecs,
        new Lucene41PostingsFormat(minItemsPerBlock, maxItemsPerBlock),
        new FSTPostingsFormat(),
        new FSTOrdPostingsFormat(),
        new FSTPulsing41PostingsFormat(1 + random.nextInt(20)),
        new FSTOrdPulsing41PostingsFormat(1 + random.nextInt(20)),
        new DirectPostingsFormat(LuceneTestCase.rarely(random) ? 1 : (LuceneTestCase.rarely(random) ? Integer.MAX_VALUE : maxItemsPerBlock),
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.