Uses of Class
org.apache.lucene.search.TopDocs
-
Packages that use TopDocs Package Description org.apache.lucene.backward_codecs.lucene90 Lucene 9.0 file format.org.apache.lucene.backward_codecs.lucene91 Lucene 9.1 file format.org.apache.lucene.classification Uses already seen data (the indexed documents) to classify an input ( can be simple text or a structured document).org.apache.lucene.classification.document Uses already seen data (the indexed documents) to classify new documents.org.apache.lucene.codecs Codecs API: API for customization of the encoding and structure of the index.org.apache.lucene.codecs.lucene92 Lucene 9.2 file format.org.apache.lucene.codecs.perfield Postings format that can delegate to different formats per-field.org.apache.lucene.codecs.simpletext Simpletext Codec: writes human readable postings.org.apache.lucene.index Code to maintain and access indices.org.apache.lucene.index.memory High-performance single-document main memory Apache Lucene fulltext search index.org.apache.lucene.misc.search Misc search implementations.org.apache.lucene.sandbox.search This package contains a flexible graph-based proximity query, TermAutomatonQuery, and geospatial queries.org.apache.lucene.search Code to search indices.org.apache.lucene.search.highlight Highlighting search terms.org.apache.lucene.search.matchhighlight This package contains several components useful to build a highlighter on top of theMatches
API.org.apache.lucene.search.suggest.document Support for document suggestionorg.apache.lucene.search.uhighlight The UnifiedHighlighter -- a flexible highlighter that can get offsets from postings, term vectors, or analysis. -
-
Uses of TopDocs in org.apache.lucene.backward_codecs.lucene90
Methods in org.apache.lucene.backward_codecs.lucene90 that return TopDocs Modifier and Type Method Description TopDocs
Lucene90HnswVectorsReader. search(java.lang.String field, float[] target, int k, Bits acceptDocs, int visitedLimit)
-
Uses of TopDocs in org.apache.lucene.backward_codecs.lucene91
Methods in org.apache.lucene.backward_codecs.lucene91 that return TopDocs Modifier and Type Method Description TopDocs
Lucene91HnswVectorsReader. search(java.lang.String field, float[] target, int k, Bits acceptDocs, int visitedLimit)
-
Uses of TopDocs in org.apache.lucene.classification
Methods in org.apache.lucene.classification that return TopDocs Modifier and Type Method Description private TopDocs
KNearestFuzzyClassifier. knnSearch(java.lang.String text)
private TopDocs
KNearestNeighborClassifier. knnSearch(java.lang.String text)
Methods in org.apache.lucene.classification with parameters of type TopDocs Modifier and Type Method Description private java.util.List<ClassificationResult<BytesRef>>
KNearestFuzzyClassifier. buildListFromTopDocs(TopDocs topDocs)
build a list of classification results from search resultsprotected java.util.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 Modifier and Type Method Description private TopDocs
KNearestNeighborDocumentClassifier. knnSearch(Document document)
Returns the top k results from a More Like This query based on the input document -
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(java.lang.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.lucene92
Methods in org.apache.lucene.codecs.lucene92 that return TopDocs Modifier and Type Method Description TopDocs
Lucene92HnswVectorsReader. search(java.lang.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(java.lang.String field, float[] target, int k, Bits acceptDocs, int visitedLimit)
-
Uses of TopDocs in org.apache.lucene.codecs.simpletext
Methods in org.apache.lucene.codecs.simpletext that return TopDocs Modifier and Type Method Description TopDocs
SimpleTextKnnVectorsReader. search(java.lang.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(java.lang.String field, float[] target, int k, Bits acceptDocs, int visitedLimit)
TopDocs
DocValuesLeafReader. searchNearestVectors(java.lang.String field, float[] target, int k, Bits acceptDocs, int visitedLimit)
TopDocs
ExitableDirectoryReader.ExitableFilterAtomicReader. searchNearestVectors(java.lang.String field, float[] target, int k, Bits acceptDocs, int visitedLimit)
TopDocs
FilterLeafReader. searchNearestVectors(java.lang.String field, float[] target, int k, Bits acceptDocs, int visitedLimit)
abstract TopDocs
LeafReader. searchNearestVectors(java.lang.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(java.lang.String fieldName, float[] target, int k, Bits acceptDocs, int visitedLimit)
-
Uses of TopDocs in org.apache.lucene.index.memory
Methods in org.apache.lucene.index.memory that return TopDocs Modifier and Type Method Description TopDocs
MemoryIndex.MemoryIndexReader. searchNearestVectors(java.lang.String field, float[] target, int k, Bits acceptDocs, int visitedLimit)
-
Uses of TopDocs in org.apache.lucene.misc.search
Methods in org.apache.lucene.misc.search that return TopDocs Modifier and Type Method Description protected TopDocs
DiversifiedTopDocsCollector. newTopDocs(ScoreDoc[] results, int start)
-
Uses of TopDocs in org.apache.lucene.sandbox.search
Methods in org.apache.lucene.sandbox.search that return TopDocs Modifier and Type Method Description protected TopDocs
LargeNumHitsTopDocsCollector. newTopDocs(ScoreDoc[] results)
Returns aTopDocs
instance containing the given results.TopDocs
LargeNumHitsTopDocsCollector. topDocs()
Returns the top docs that were collected by this collector.TopDocs
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.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.private static TopDocs
KnnVectorQuery. NO_RESULTS
Methods in org.apache.lucene.search that return TopDocs Modifier and Type Method Description private TopDocs
KnnVectorQuery. approximateSearch(LeafReaderContext context, Bits acceptDocs, int visitedLimit)
protected TopDocs
KnnVectorQuery. exactSearch(LeafReaderContext context, DocIdSetIterator acceptIterator)
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, java.util.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.private static TopDocs
TopDocs. mergeAux(Sort sort, int start, int size, TopDocs[] shardHits, java.util.Comparator<ScoreDoc> tieBreaker)
Auxiliary method used by themerge(int, org.apache.lucene.search.TopDocs[])
impls.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)
protected TopDocs
TopScoreDocCollector.PagingTopScoreDocCollector. 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
).private TopDocs
KnnVectorQuery. searchLeaf(LeafReaderContext ctx, KnnVectorQuery.BitSetCollector filterCollector)
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 private Query
KnnVectorQuery. createRewrittenQuery(IndexReader reader, TopDocs topK)
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, java.util.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.private static TopDocs
TopDocs. mergeAux(Sort sort, int start, int size, TopDocs[] shardHits, java.util.Comparator<ScoreDoc> tieBreaker)
Auxiliary method used by themerge(int, org.apache.lucene.search.TopDocs[])
impls.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)
Constructors in org.apache.lucene.search with parameters of type TopDocs Constructor Description MergeSortQueue(Sort sort, TopDocs[] shardHits, java.util.Comparator<ScoreDoc> tieBreaker)
ScoreMergeSortQueue(TopDocs[] shardHits, java.util.Comparator<ScoreDoc> tieBreakerComparator)
-
Uses of TopDocs in org.apache.lucene.search.highlight
Methods in org.apache.lucene.search.highlight that return TopDocs Modifier and Type Method Description TopDocs
TermVectorLeafReader. searchNearestVectors(java.lang.String field, float[] target, int k, Bits acceptDocs, int visitedLimit)
-
Uses of TopDocs in org.apache.lucene.search.matchhighlight
Methods in org.apache.lucene.search.matchhighlight with parameters of type TopDocs Modifier and Type Method Description java.util.stream.Stream<MatchHighlighter.DocHighlights>
MatchHighlighter. highlight(TopDocs topDocs, Query... queries)
void
MatchRegionRetriever. 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.document Modifier and Type Class Description class
TopSuggestDocs
-
Uses of TopDocs in org.apache.lucene.search.uhighlight
Methods in org.apache.lucene.search.uhighlight with parameters of type TopDocs Modifier and Type Method Description java.lang.String[]
UnifiedHighlighter. highlight(java.lang.String field, Query query, TopDocs topDocs)
Highlights the top passages from a single field.java.lang.String[]
UnifiedHighlighter. highlight(java.lang.String field, Query query, TopDocs topDocs, int maxPassages)
Highlights the top-N passages from a single field.java.util.Map<java.lang.String,java.lang.String[]>
UnifiedHighlighter. highlightFields(java.lang.String[] fields, Query query, TopDocs topDocs)
Highlights the top passages from multiple fields.java.util.Map<java.lang.String,java.lang.String[]>
UnifiedHighlighter. highlightFields(java.lang.String[] fields, Query query, TopDocs topDocs, int[] maxPassages)
Highlights the top-N passages from multiple fields.
-