Uses of Class
org.apache.lucene.search.TopDocs
Packages that use TopDocs
Package
Description
Code to maintain and access indices.
Code to search indices.
Navigable Small-World graph, nominally Hierarchical but currently only has a single layer.
-
Uses of TopDocs in org.apache.lucene.index
Methods in org.apache.lucene.index that return TopDocsModifier and TypeMethodDescriptionfinal TopDocs
LeafReader.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 TopDocs
LeafReader.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.search
Subclasses of TopDocs in org.apache.lucene.searchModifier and TypeClassDescriptionclass
Represents hits returned byIndexSearcher.search(Query,int,Sort)
.Fields in org.apache.lucene.search declared as TopDocsModifier and TypeFieldDescriptionstatic final TopDocs
TopDocsCollector.EMPTY_TOPDOCS
This 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 TypeMethodDescriptionprotected TopDocs
ByteVectorSimilarityQuery.approximateSearch
(LeafReaderContext context, Bits acceptDocs, int visitLimit, KnnCollectorManager knnCollectorManager) protected TopDocs
FloatVectorSimilarityQuery.approximateSearch
(LeafReaderContext context, Bits acceptDocs, int visitLimit, KnnCollectorManager knnCollectorManager) protected TopDocs
KnnByteVectorQuery.approximateSearch
(LeafReaderContext context, Bits acceptDocs, int visitedLimit, KnnCollectorManager knnCollectorManager) protected TopDocs
KnnFloatVectorQuery.approximateSearch
(LeafReaderContext context, Bits acceptDocs, int visitedLimit, KnnCollectorManager knnCollectorManager) protected TopDocs
PatienceKnnVectorQuery.approximateSearch
(LeafReaderContext context, Bits acceptDocs, int visitedLimit, KnnCollectorManager knnCollectorManager) protected TopDocs
SeededKnnVectorQuery.approximateSearch
(LeafReaderContext context, Bits acceptDocs, int visitedLimit, KnnCollectorManager knnCollectorManager) protected TopDocs
PatienceKnnVectorQuery.exactSearch
(LeafReaderContext context, DocIdSetIterator acceptIterator, QueryTimeout queryTimeout) protected TopDocs
SeededKnnVectorQuery.exactSearch
(LeafReaderContext context, DocIdSetIterator acceptIterator, QueryTimeout queryTimeout) static TopDocs
Same asmerge(int, TopDocs[])
but also ignores the topstart
top docs.static TopDocs
TopDocs.merge
(int start, int topN, TopDocs[] shardHits, Comparator<ScoreDoc> tieBreaker) Same as above, but accepts the passed in tie breakerstatic TopDocs
Returns a new TopDocs, containing topN results across the provided TopDocs, sorting by score.protected TopDocs
PatienceKnnVectorQuery.mergeLeafResults
(TopDocs[] perLeafResults) protected TopDocs
SeededKnnVectorQuery.mergeLeafResults
(TopDocs[] perLeafResults) protected TopDocs
TopDocsCollector.newTopDocs
(ScoreDoc[] results, int start) Returns aTopDocs
instance containing the given results.protected TopDocs
TopFieldCollector.newTopDocs
(ScoreDoc[] results, int start) protected TopDocs
TopScoreDocCollector.newTopDocs
(ScoreDoc[] results, int start) TopScoreDocCollectorManager.reduce
(Collection<TopScoreDocCollector> collectors) QueryRescorer.rescore
(IndexSearcher searcher, TopDocs firstPassTopDocs, int topN) static TopDocs
QueryRescorer.rescore
(IndexSearcher searcher, TopDocs topDocs, Query query, double weight, int topN) Sugar API, calling {#rescore} using a simple linear combination of firstPassScore + weight * secondPassScoreabstract TopDocs
Rescorer.rescore
(IndexSearcher searcher, TopDocs firstPassTopDocs, int topN) Rescore an initial first-passTopDocs
.SortRescorer.rescore
(IndexSearcher searcher, TopDocs firstPassTopDocs, int topN) static TopDocs
Reciprocal Rank Fusion method.Finds the topn
hits forquery
.IndexSearcher.searchAfter
(ScoreDoc after, Query query, int numHits) Finds the topn
hits forquery
where all results are after a previous result (after
).IndexSearcher.searchAfter
(ScoreDoc after, Query query, int n, Sort sort) Finds the topn
hits forquery
where all results are after a previous result (after
).abstract TopDocs
AbstractKnnCollector.topDocs()
HnswQueueSaturationCollector.topDocs()
KnnCollector.Decorator.topDocs()
KnnCollector.topDocs()
This drains the collected nearest kNN results and returns them in a newTopDocs
collection, ordered by score descending.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()
Methods in org.apache.lucene.search with parameters of type TopDocsModifier and TypeMethodDescriptionstatic TopDocs
Same asmerge(int, TopDocs[])
but also ignores the topstart
top docs.static TopDocs
TopDocs.merge
(int start, int topN, TopDocs[] shardHits, Comparator<ScoreDoc> tieBreaker) Same as above, but accepts the passed in tie breakerstatic TopDocs
Returns a new TopDocs, containing topN results across the provided TopDocs, sorting by score.protected TopDocs
PatienceKnnVectorQuery.mergeLeafResults
(TopDocs[] perLeafResults) protected TopDocs
SeededKnnVectorQuery.mergeLeafResults
(TopDocs[] perLeafResults) QueryRescorer.rescore
(IndexSearcher searcher, TopDocs firstPassTopDocs, int topN) static TopDocs
QueryRescorer.rescore
(IndexSearcher searcher, TopDocs topDocs, Query query, double weight, int topN) Sugar API, calling {#rescore} using a simple linear combination of firstPassScore + weight * secondPassScoreabstract TopDocs
Rescorer.rescore
(IndexSearcher searcher, TopDocs firstPassTopDocs, int topN) Rescore an initial first-passTopDocs
.SortRescorer.rescore
(IndexSearcher searcher, TopDocs firstPassTopDocs, int topN) static TopDocs
Reciprocal Rank Fusion method. -
Uses of TopDocs in org.apache.lucene.util.hnsw
Methods in org.apache.lucene.util.hnsw that return TopDocs