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 maintain and access indices.
Misc search implementations.
This package contains a flexible graph-based proximity query, TermAutomatonQuery, and geospatial
queries.
Code to search indices.
Support for index-time and query-time joins.
Classes related to vector search: knn and vector fields.
This package contains several components useful to build a highlighter on top of the
Matches API.Support for document suggestion
The UnifiedHighlighter -- a flexible highlighter that can get offsets from postings, term
vectors, or analysis.
Navigable Small-World graph, nominally Hierarchical but currently only has a single layer.
-
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.index
Methods in org.apache.lucene.index that return TopDocsModifier and TypeMethodDescriptionfinal TopDocsLeafReader.searchNearestVectors(String field, byte[] target, int k, Bits acceptDocs, int visitedLimit) Return the k nearest neighbor documents as determined by comparison of their vector values for this field, to the given vector, by the field's similarity function.final TopDocsLeafReader.searchNearestVectors(String field, float[] target, int k, Bits acceptDocs, int visitedLimit) Return the k nearest neighbor documents as determined by comparison of their vector values for this field, to the given vector, by the field's similarity function. -
Uses of TopDocs in org.apache.lucene.misc.search
Methods in org.apache.lucene.misc.search that return TopDocsModifier and TypeMethodDescriptionprotected TopDocsDiversifiedTopDocsCollector.newTopDocs(ScoreDoc[] results, int start) -
Uses of TopDocs in org.apache.lucene.sandbox.search
Methods in org.apache.lucene.sandbox.search that return TopDocsModifier and TypeMethodDescriptionprotected TopDocsLargeNumHitsTopDocsCollector.newTopDocs(ScoreDoc[] results) Returns aTopDocsinstance containing the given results.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. -
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 TypeFieldDescriptionstatic final TopDocsTopDocsCollector.EMPTY_TOPDOCSThis is used in case topDocs() is called with illegal parameters, or there simply aren't (enough) results.private static final TopDocsAbstractKnnVectorQuery.NO_RESULTSprivate static final TopDocsKnnByteVectorQuery.NO_RESULTSprivate static final TopDocsKnnFloatVectorQuery.NO_RESULTSMethods in org.apache.lucene.search that return TopDocsModifier and TypeMethodDescriptionprotected abstract TopDocsAbstractKnnVectorQuery.approximateSearch(LeafReaderContext context, Bits acceptDocs, int visitedLimit, KnnCollectorManager knnCollectorManager) protected abstract TopDocsAbstractVectorSimilarityQuery.approximateSearch(LeafReaderContext context, Bits acceptDocs, int visitLimit) protected TopDocsByteVectorSimilarityQuery.approximateSearch(LeafReaderContext context, Bits acceptDocs, int visitLimit) protected TopDocsFloatVectorSimilarityQuery.approximateSearch(LeafReaderContext context, Bits acceptDocs, int visitLimit) protected TopDocsKnnByteVectorQuery.approximateSearch(LeafReaderContext context, Bits acceptDocs, int visitedLimit, KnnCollectorManager knnCollectorManager) protected TopDocsKnnFloatVectorQuery.approximateSearch(LeafReaderContext context, Bits acceptDocs, int visitedLimit, KnnCollectorManager knnCollectorManager) protected TopDocsAbstractKnnVectorQuery.exactSearch(LeafReaderContext context, DocIdSetIterator acceptIterator, QueryTimeout queryTimeout) private TopDocsAbstractKnnVectorQuery.getLeafResults(LeafReaderContext ctx, Weight filterWeight, TimeLimitingKnnCollectorManager timeLimitingKnnCollectorManager) static TopDocsSame asmerge(int, TopDocs[])but also ignores the topstarttop docs.static TopDocsTopDocs.merge(int start, int topN, TopDocs[] shardHits, Comparator<ScoreDoc> tieBreaker) Same as above, but accepts the passed in tie breakerstatic TopDocsReturns a new TopDocs, containing topN results across the provided TopDocs, sorting by score.private static TopDocsTopDocs.mergeAux(Sort sort, int start, int size, TopDocs[] shardHits, Comparator<ScoreDoc> tieBreaker) Auxiliary method used by themerge(int, org.apache.lucene.search.TopDocs[])impls.protected TopDocsAbstractKnnVectorQuery.mergeLeafResults(TopDocs[] perLeafResults) Merges all segment-level kNN results to get the index-level kNN 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) TopScoreDocCollectorManager.reduce(Collection<TopScoreDocCollector> collectors) 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).private TopDocsAbstractKnnVectorQuery.searchLeaf(LeafReaderContext ctx, Weight filterWeight, TimeLimitingKnnCollectorManager timeLimitingKnnCollectorManager) abstract TopDocsAbstractKnnCollector.topDocs()KnnCollector.topDocs()This drains the collected nearest kNN results and returns them in a newTopDocscollection, ordered by score descending.TimeLimitingKnnCollectorManager.TimeLimitingKnnCollector.topDocs()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 ..TopKnnCollector.topDocs()VectorSimilarityCollector.topDocs()Methods in org.apache.lucene.search that return types with arguments of type TopDocsModifier and TypeMethodDescriptionTopScoreDocCollector.createSharedManager(int numHits, ScoreDoc after, int totalHitsThreshold) Deprecated.Methods in org.apache.lucene.search with parameters of type TopDocsModifier and TypeMethodDescriptionprivate QueryAbstractKnnVectorQuery.createRewrittenQuery(IndexReader reader, TopDocs topK) static TopDocsSame asmerge(int, TopDocs[])but also ignores the topstarttop docs.static TopDocsTopDocs.merge(int start, int topN, TopDocs[] shardHits, Comparator<ScoreDoc> tieBreaker) Same as above, but accepts the passed in tie breakerstatic TopDocsReturns a new TopDocs, containing topN results across the provided TopDocs, sorting by score.private static TopDocsTopDocs.mergeAux(Sort sort, int start, int size, TopDocs[] shardHits, Comparator<ScoreDoc> tieBreaker) Auxiliary method used by themerge(int, org.apache.lucene.search.TopDocs[])impls.protected TopDocsAbstractKnnVectorQuery.mergeLeafResults(TopDocs[] perLeafResults) Merges all segment-level kNN results to get the index-level kNN results.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, Comparator<ScoreDoc> tieBreaker) ScoreMergeSortQueue(TopDocs[] shardHits, Comparator<ScoreDoc> tieBreakerComparator) -
Uses of TopDocs in org.apache.lucene.search.join
Fields in org.apache.lucene.search.join declared as TopDocsModifier and TypeFieldDescriptionprivate static final TopDocsDiversifyingChildrenByteKnnVectorQuery.NO_RESULTSprivate static final TopDocsDiversifyingChildrenFloatKnnVectorQuery.NO_RESULTSMethods in org.apache.lucene.search.join that return TopDocsModifier and TypeMethodDescriptionprotected TopDocsDiversifyingChildrenByteKnnVectorQuery.approximateSearch(LeafReaderContext context, Bits acceptDocs, int visitedLimit, KnnCollectorManager knnCollectorManager) protected TopDocsDiversifyingChildrenFloatKnnVectorQuery.approximateSearch(LeafReaderContext context, Bits acceptDocs, int visitedLimit, KnnCollectorManager knnCollectorManager) protected TopDocsDiversifyingChildrenByteKnnVectorQuery.exactSearch(LeafReaderContext context, DocIdSetIterator acceptIterator, QueryTimeout queryTimeout) protected TopDocsDiversifyingChildrenFloatKnnVectorQuery.exactSearch(LeafReaderContext context, DocIdSetIterator acceptIterator, QueryTimeout queryTimeout) DiversifyingNearestChildrenKnnCollector.topDocs() -
Uses of TopDocs in org.apache.lucene.search.knn
Methods in org.apache.lucene.search.knn that return TopDocs -
Uses of TopDocs in org.apache.lucene.search.matchhighlight
Methods in org.apache.lucene.search.matchhighlight with parameters of type TopDocsModifier and TypeMethodDescriptionvoidMatchRegionRetriever.highlightDocuments(TopDocs topDocs, MatchRegionRetriever.MatchOffsetsConsumer consumer) -
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. -
Uses of TopDocs in org.apache.lucene.util.hnsw
Methods in org.apache.lucene.util.hnsw that return TopDocs
TopScoreDocCollectorManagerdue to its support for concurrency in IndexSearcher