Uses of Class
org.apache.lucene.search.TopDocs
Packages that use TopDocs
Package
Description
Uses already seen data (the indexed documents) to classify an input ( can be simple text or a structured document).
Uses already seen data (the indexed documents) to classify new documents.
Code to search indices.
Support for document suggestion
The UnifiedHighlighter -- a flexible highlighter that can get offsets from postings, term vectors, or analysis.
-
Uses of TopDocs in org.apache.lucene.classification
Methods in org.apache.lucene.classification that return TopDocsMethods in org.apache.lucene.classification with parameters of type TopDocsModifier and TypeMethodDescriptionprivate List<ClassificationResult<BytesRef>> KNearestFuzzyClassifier.buildListFromTopDocs(TopDocs topDocs) build a list of classification results from search resultsprotected List<ClassificationResult<BytesRef>> KNearestNeighborClassifier.buildListFromTopDocs(TopDocs topDocs) build a list of classification results from search resultsprotected ClassificationResult<BytesRef> KNearestNeighborClassifier.classifyFromTopDocs(TopDocs knnResults) TODO -
Uses of TopDocs in org.apache.lucene.classification.document
Methods in org.apache.lucene.classification.document that return TopDocs -
Uses of TopDocs in org.apache.lucene.search
Subclasses of TopDocs in org.apache.lucene.searchModifier and TypeClassDescriptionclassRepresents hits returned byIndexSearcher.search(Query,int,Sort).Fields in org.apache.lucene.search declared as TopDocsModifier and TypeFieldDescriptionprotected static final TopDocsTopDocsCollector.EMPTY_TOPDOCSThis is used in case topDocs() is called with illegal parameters, or there simply aren't (enough) results.Methods in org.apache.lucene.search that return TopDocsModifier and TypeMethodDescriptionstatic TopDocsSame asmerge(int, TopDocs[])but also ignores the topstarttop docs.static TopDocsReturns a new TopDocs, containing topN results across the provided TopDocs, sorting by score.private static TopDocsAuxiliary method used by themerge(int, org.apache.lucene.search.TopDocs[])impls.protected TopDocsDiversifiedTopDocsCollector.newTopDocs(ScoreDoc[] results, int start) protected TopDocsLargeNumHitsTopDocsCollector.newTopDocs(ScoreDoc[] results) Returns aTopDocsinstance containing the given results.protected TopDocsTopDocsCollector.newTopDocs(ScoreDoc[] results, int start) Returns aTopDocsinstance containing the given results.protected TopDocsTopFieldCollector.newTopDocs(ScoreDoc[] results, int start) protected TopDocsTopScoreDocCollector.newTopDocs(ScoreDoc[] results, int start) protected TopDocsTopScoreDocCollector.PagingTopScoreDocCollector.newTopDocs(ScoreDoc[] results, int start) QueryRescorer.rescore(IndexSearcher searcher, TopDocs firstPassTopDocs, int topN) static TopDocsQueryRescorer.rescore(IndexSearcher searcher, TopDocs topDocs, Query query, double weight, int topN) Sugar API, calling {#rescore} using a simple linear combination of firstPassScore + weight * secondPassScoreabstract TopDocsRescorer.rescore(IndexSearcher searcher, TopDocs firstPassTopDocs, int topN) Rescore an initial first-passTopDocs.SortRescorer.rescore(IndexSearcher searcher, TopDocs firstPassTopDocs, int topN) Finds the topnhits forquery.IndexSearcher.searchAfter(ScoreDoc after, Query query, int numHits) Finds the topnhits forquerywhere all results are after a previous result (after).IndexSearcher.searchAfter(ScoreDoc after, Query query, int n, Sort sort) Finds the topnhits forquerywhere all results are after a previous result (after).LargeNumHitsTopDocsCollector.topDocs()Returns the top docs that were collected by this collector.LargeNumHitsTopDocsCollector.topDocs(int howMany) Returns the top docs that were collected by this collector.TopDocsCollector.topDocs()Returns the top docs that were collected by this collector.TopDocsCollector.topDocs(int start) Returns the documents in the range [start ..TopDocsCollector.topDocs(int start, int howMany) Returns the documents in the range [start ..Methods in org.apache.lucene.search that return types with arguments of type TopDocsModifier and TypeMethodDescriptionTopScoreDocCollector.createSharedManager(int numHits, FieldDoc after, int totalHitsThreshold) Create a CollectorManager which uses a shared hit counter to maintain number of hits and a sharedMaxScoreAccumulatorto propagate the minimum score accross segmentsMethods in org.apache.lucene.search with parameters of type TopDocsModifier and TypeMethodDescriptionstatic TopDocsSame asmerge(int, TopDocs[])but also ignores the topstarttop docs.static TopDocsReturns a new TopDocs, containing topN results across the provided TopDocs, sorting by score.private static TopDocsAuxiliary method used by themerge(int, org.apache.lucene.search.TopDocs[])impls.QueryRescorer.rescore(IndexSearcher searcher, TopDocs firstPassTopDocs, int topN) static TopDocsQueryRescorer.rescore(IndexSearcher searcher, TopDocs topDocs, Query query, double weight, int topN) Sugar API, calling {#rescore} using a simple linear combination of firstPassScore + weight * secondPassScoreabstract TopDocsRescorer.rescore(IndexSearcher searcher, TopDocs firstPassTopDocs, int topN) Rescore an initial first-passTopDocs.SortRescorer.rescore(IndexSearcher searcher, TopDocs firstPassTopDocs, int topN) Constructors in org.apache.lucene.search with parameters of type TopDocsModifierConstructorDescriptionMergeSortQueue(Sort sort, TopDocs[] shardHits) ScoreMergeSortQueue(TopDocs[] shardHits) -
Uses of TopDocs in org.apache.lucene.search.suggest.document
Subclasses of TopDocs in org.apache.lucene.search.suggest.documentModifier and TypeClassDescriptionclass -
Uses of TopDocs in org.apache.lucene.search.uhighlight
Methods in org.apache.lucene.search.uhighlight with parameters of type TopDocsModifier and TypeMethodDescriptionString[]Highlights the top passages from a single field.String[]Highlights the top-N passages from a single field.UnifiedHighlighter.highlightFields(String[] fields, Query query, TopDocs topDocs) Highlights the top passages from multiple fields.UnifiedHighlighter.highlightFields(String[] fields, Query query, TopDocs topDocs, int[] maxPassages) Highlights the top-N passages from multiple fields.