Uses of Class
org.apache.lucene.search.TopDocs
-
Packages that use TopDocs Package Description org.apache.lucene.codecs Codecs API: API for customization of the encoding and structure of the index.org.apache.lucene.codecs.lucene95 Lucene 9.5 file format.org.apache.lucene.codecs.perfield Postings format that can delegate to different formats per-field.org.apache.lucene.index Code to maintain and access indices.org.apache.lucene.search Code to search indices. -
-
Uses of TopDocs in org.apache.lucene.codecs
Methods in org.apache.lucene.codecs that return TopDocs Modifier and Type Method Description abstract TopDocs
KnnVectorsReader. search(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.abstract TopDocs
KnnVectorsReader. search(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.codecs.lucene95
Methods in org.apache.lucene.codecs.lucene95 that return TopDocs Modifier and Type Method Description TopDocs
Lucene95HnswVectorsReader. search(String field, byte[] target, int k, Bits acceptDocs, int visitedLimit)
TopDocs
Lucene95HnswVectorsReader. search(String field, float[] target, int k, Bits acceptDocs, int visitedLimit)
-
Uses of TopDocs in org.apache.lucene.codecs.perfield
Methods in org.apache.lucene.codecs.perfield that return TopDocs Modifier and Type Method Description TopDocs
PerFieldKnnVectorsFormat.FieldsReader. search(String field, byte[] target, int k, Bits acceptDocs, int visitedLimit)
TopDocs
PerFieldKnnVectorsFormat.FieldsReader. search(String field, float[] target, int k, Bits acceptDocs, int visitedLimit)
-
Uses of TopDocs in org.apache.lucene.index
Methods in org.apache.lucene.index that return TopDocs Modifier and Type Method Description TopDocs
CodecReader. searchNearestVectors(String field, byte[] target, int k, Bits acceptDocs, int visitedLimit)
TopDocs
CodecReader. searchNearestVectors(String field, float[] target, int k, Bits acceptDocs, int visitedLimit)
TopDocs
ExitableDirectoryReader.ExitableFilterAtomicReader. searchNearestVectors(String field, float[] target, int k, Bits acceptDocs, int visitedLimit)
TopDocs
FilterLeafReader. searchNearestVectors(String field, byte[] target, int k, Bits acceptDocs, int visitedLimit)
TopDocs
FilterLeafReader. searchNearestVectors(String field, float[] target, int k, Bits acceptDocs, int visitedLimit)
abstract 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.abstract 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.TopDocs
ParallelLeafReader. searchNearestVectors(String fieldName, byte[] target, int k, Bits acceptDocs, int visitedLimit)
TopDocs
ParallelLeafReader. searchNearestVectors(String fieldName, float[] target, int k, Bits acceptDocs, int visitedLimit)
-
Uses of TopDocs in org.apache.lucene.search
Subclasses of TopDocs in org.apache.lucene.search Modifier and Type Class Description class
TopFieldDocs
Represents hits returned byIndexSearcher.search(Query,int,Sort)
.Fields in org.apache.lucene.search declared as TopDocs Modifier and Type Field Description static 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 TopDocs Modifier and Type Method Description protected TopDocs
KnnByteVectorQuery. approximateSearch(LeafReaderContext context, Bits acceptDocs, int visitedLimit)
protected TopDocs
KnnFloatVectorQuery. approximateSearch(LeafReaderContext context, Bits acceptDocs, int visitedLimit)
static TopDocs
TopDocs. merge(int start, int topN, TopDocs[] shardHits)
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
TopDocs. merge(int topN, TopDocs[] shardHits)
Returns a new TopDocs, containing topN results across the provided TopDocs, sorting by score.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)
TopDocs
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
.TopDocs
SortRescorer. rescore(IndexSearcher searcher, TopDocs firstPassTopDocs, int topN)
TopDocs
IndexSearcher. search(Query query, int n)
Finds the topn
hits forquery
.TopDocs
IndexSearcher. searchAfter(ScoreDoc after, Query query, int numHits)
Finds the topn
hits forquery
where all results are after a previous result (after
).TopDocs
IndexSearcher. searchAfter(ScoreDoc after, Query query, int n, Sort sort)
Finds the topn
hits forquery
where all results are after a previous result (after
).TopDocs
TopDocsCollector. topDocs()
Returns the top docs that were collected by this collector.TopDocs
TopDocsCollector. topDocs(int start)
Returns the documents in the range [start ..TopDocs
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 TopDocs Modifier and Type Method Description static CollectorManager<TopScoreDocCollector,TopDocs>
TopScoreDocCollector. createSharedManager(int numHits, ScoreDoc after, int totalHitsThreshold)
Create a CollectorManager which uses a shared hit counter to maintain number of hits and a sharedMaxScoreAccumulator
to propagate the minimum score accross segmentsMethods in org.apache.lucene.search with parameters of type TopDocs Modifier and Type Method Description static TopDocs
TopDocs. merge(int start, int topN, TopDocs[] shardHits)
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
TopDocs. merge(int topN, TopDocs[] shardHits)
Returns a new TopDocs, containing topN results across the provided TopDocs, sorting by score.TopDocs
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
.TopDocs
SortRescorer. rescore(IndexSearcher searcher, TopDocs firstPassTopDocs, int topN)
-