Package com.greplin.lucene.util

Examples of com.greplin.lucene.util.FilterIntersectionProvider$DocIdSetIntersection


          if (step == (round & 1)) {
            long millis = System.currentTimeMillis();
            long hits = 0;
            for (String[] queryWords : queries) {
              PhraseFilter pf = new PhraseFilter(
                  new FilterIntersectionProvider(TermsFilter.from(new Term("second", "yes"))), FIELD, queryWords);
              hits += searcher.search(new FilteredQuery(new MatchAllDocsQuery(), pf), 1).totalHits;
            }
            ms1 = System.currentTimeMillis() - millis;
            System.out.println("Finished " + name1 + " in " + ms1 + "ms with " + hits + " hits");
          } else {
View Full Code Here


  }

  @Test
  public void testIntersectionWithFilter() throws Exception {
    IndexReader reader = createReaderWithSampleDocuments();
    IntersectionProvider filter = new FilterIntersectionProvider(
        TermsFilter.from(new Term("name", "one"), new Term("name", "two")));

    assertFilterBitsEqual(reader, new PhraseFilter("f", "world"), true, true, true);
    assertFilterBitsEqual(reader, new PhraseFilter(filter, "f", "world"), true, true, false);
View Full Code Here

TOP

Related Classes of com.greplin.lucene.util.FilterIntersectionProvider$DocIdSetIntersection

Copyright © 2018 www.massapicom. 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.