Examples of topDocs()


Examples of com.browseengine.bobo.sort.SortCollector.topDocs()

   
    Map<String, FacetAccessible> facetCollectors = new HashMap<String, FacetAccessible>();
    browse(req, collector, facetCollectors);
    BrowseHit[] hits = null;
    try{
      hits = collector.topDocs();
    }
    catch (IOException e){
      logger.error(e.getMessage(), e);
      hits = new BrowseHit[0];
    }
View Full Code Here

Examples of com.browseengine.bobo.sort.SortCollector.topDocs()

    browse(req, collector, facetCollectors);
    BrowseHit[] hits = null;

    try
    {
      hits = collector.topDocs();
    }
    catch (IOException e)
    {
      logger.error(e.getMessage(), e);
      hits = new BrowseHit[0];
View Full Code Here

Examples of com.browseengine.bobo.sort.SortCollector.topDocs()

    if (req.getMapReduceWrapper() != null) {
      result.setMapReduceResult(req.getMapReduceWrapper().getResult());
    }
    BrowseHit[] hits = null;
    try {
      hits = collector.topDocs();
    } catch (IOException e) {
      logger.error(e.getMessage(), e);
      result.addError(e.getMessage());
      hits = new BrowseHit[0];
    }
View Full Code Here

Examples of org.apache.lucene.search.TopDocCollector.topDocs()

        }

        IndexSearcher searcher=new IndexSearcher(this.spellindex);
        TopDocCollector collector = new TopDocCollector(10 * num_sug); // go thru more than 'maxr' matches in case the distance filter triggers
        searcher.search(query, collector);
        ScoreDoc[] scoreDocs = collector.topDocs().scoreDocs;

        SuggestWordQueue sugqueue=new SuggestWordQueue(num_sug);
        SuggestWord sugword = new SuggestWord();
        for (int i = 0; i < scoreDocs.length; i++) {

View Full Code Here

Examples of org.apache.lucene.search.TopDocsCollector.topDocs()

        }
      } else {
        groupSortValues = null;
      }

      final TopDocs topDocs = collector.topDocs(withinGroupOffset, maxDocsPerGroup);

      groups[downTo] = new GroupDocs<Object>(topDocs.getMaxScore(),
                                     og.count,
                                     topDocs.scoreDocs,
                                     null,
View Full Code Here

Examples of org.apache.lucene.search.TopDocsCollector.topDocs()

        }
      } else {
        groupSortValues = null;
      }

      final TopDocs topDocs = collector.topDocs(withinGroupOffset, maxDocsPerGroup);

      groups[downTo] = new GroupDocs<Object>(topDocs.getMaxScore(),
                                     og.count,
                                     topDocs.scoreDocs,
                                     null,
View Full Code Here

Examples of org.apache.lucene.search.TopFieldCollector.topDocs()

          TopFieldCollector collector = TopFieldCollector.create(sort, numHits,
                                                                 true, withScore(),
                                                                 withMaxScore(),
                                                                 !w.scoresDocsOutOfOrder());
          searcher.search(w, null, collector);
          hits = collector.topDocs();
        } else {
          hits = searcher.search(q, numHits);
        }

        final String printHitsField = getRunData().getConfig().get("print.hits.field", null);
View Full Code Here

Examples of org.apache.lucene.search.TopFieldCollector.topDocs()

            TopFieldCollector collector = TopFieldCollector.create(sort, numHits,
                                                                   true, withScore(),
                                                                   withMaxScore(),
                                                                   false);
            searcher.search(q, null, collector);
            hits = collector.topDocs();
          } else {
            hits = searcher.search(q, numHits);
          }
        } else {
          Collector collector = createCollector();
View Full Code Here

Examples of org.apache.lucene.search.TopFieldCollector.topDocs()

                                                                      true,
                                                                      doDocScores,
                                                                      doMaxScore,
                                                                      true);
      DrillSidewaysResult r = search(query, hitCollector, fsp);
      return new DrillSidewaysResult(r.facetResults, hitCollector.topDocs());
    } else {
      return search(after, query, topN, fsp);
    }
  }
View Full Code Here

Examples of org.apache.lucene.search.TopFieldCollector.topDocs()

      final TermQuery query = new TermQuery(new Term("s", RandomPicks.randomFrom(random(), terms)));
      searcher.search(query, collector1);
      searcher.search(query, new EarlyTerminatingSortingCollector(collector2, sorter, numHits));
    }
    assertTrue(collector1.getTotalHits() >= collector2.getTotalHits());
    assertTopDocsEquals(collector1.topDocs().scoreDocs, collector2.topDocs().scoreDocs);
  }
 
  public void testEarlyTerminationDifferentSorter() throws IOException {
    // test that the collector works correctly when the index was sorted by a
    // different sorter than the one specified in the ctor.
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.