Uses of Interface
org.apache.lucene.search.KnnCollector
Packages that use KnnCollector
Package
Description
Lucene 9.0 file format.
Lucene 9.1 file format.
Lucene 9.2 file format.
Lucene 9.4 file format.
Lucene 9.5 file format.
Codecs API: API for customization of the encoding and structure of the index.
Lucene 9.9 file format.
Postings format that can delegate to different formats per-field.
Simpletext Codec: writes human readable postings.
Code to maintain and access indices.
High-performance single-document main memory Apache Lucene fulltext search index.
Code to search indices.
Highlighting search terms.
Support for index-time and query-time joins.
Classes related to vector search: knn and vector fields.
Navigable Small-World graph, nominally Hierarchical but currently only has a single layer.
-
Uses of KnnCollector in org.apache.lucene.backward_codecs.lucene90
Methods in org.apache.lucene.backward_codecs.lucene90 with parameters of type KnnCollectorModifier and TypeMethodDescriptionvoidLucene90HnswVectorsReader.search(String field, byte[] target, KnnCollector knnCollector, Bits acceptDocs) voidLucene90HnswVectorsReader.search(String field, float[] target, KnnCollector knnCollector, Bits acceptDocs) -
Uses of KnnCollector in org.apache.lucene.backward_codecs.lucene91
Methods in org.apache.lucene.backward_codecs.lucene91 with parameters of type KnnCollectorModifier and TypeMethodDescriptionvoidLucene91HnswVectorsReader.search(String field, byte[] target, KnnCollector knnCollector, Bits acceptDocs) voidLucene91HnswVectorsReader.search(String field, float[] target, KnnCollector knnCollector, Bits acceptDocs) -
Uses of KnnCollector in org.apache.lucene.backward_codecs.lucene92
Methods in org.apache.lucene.backward_codecs.lucene92 with parameters of type KnnCollectorModifier and TypeMethodDescriptionvoidLucene92HnswVectorsReader.search(String field, byte[] target, KnnCollector knnCollector, Bits acceptDocs) voidLucene92HnswVectorsReader.search(String field, float[] target, KnnCollector knnCollector, Bits acceptDocs) -
Uses of KnnCollector in org.apache.lucene.backward_codecs.lucene94
Methods in org.apache.lucene.backward_codecs.lucene94 with parameters of type KnnCollectorModifier and TypeMethodDescriptionvoidLucene94HnswVectorsReader.search(String field, byte[] target, KnnCollector knnCollector, Bits acceptDocs) voidLucene94HnswVectorsReader.search(String field, float[] target, KnnCollector knnCollector, Bits acceptDocs) -
Uses of KnnCollector in org.apache.lucene.backward_codecs.lucene95
Methods in org.apache.lucene.backward_codecs.lucene95 with parameters of type KnnCollectorModifier and TypeMethodDescriptionvoidLucene95HnswVectorsReader.search(String field, byte[] target, KnnCollector knnCollector, Bits acceptDocs) voidLucene95HnswVectorsReader.search(String field, float[] target, KnnCollector knnCollector, Bits acceptDocs) -
Uses of KnnCollector in org.apache.lucene.codecs
Methods in org.apache.lucene.codecs with parameters of type KnnCollectorModifier and TypeMethodDescriptionabstract voidKnnVectorsReader.search(String field, byte[] target, KnnCollector knnCollector, Bits acceptDocs) 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 voidKnnVectorsReader.search(String field, float[] target, KnnCollector knnCollector, Bits acceptDocs) 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 KnnCollector in org.apache.lucene.codecs.lucene99
Methods in org.apache.lucene.codecs.lucene99 with parameters of type KnnCollectorModifier and TypeMethodDescriptionvoidLucene99HnswVectorsReader.search(String field, byte[] target, KnnCollector knnCollector, Bits acceptDocs) voidLucene99HnswVectorsReader.search(String field, float[] target, KnnCollector knnCollector, Bits acceptDocs) -
Uses of KnnCollector in org.apache.lucene.codecs.perfield
Methods in org.apache.lucene.codecs.perfield with parameters of type KnnCollectorModifier and TypeMethodDescriptionvoidPerFieldKnnVectorsFormat.FieldsReader.search(String field, byte[] target, KnnCollector knnCollector, Bits acceptDocs) voidPerFieldKnnVectorsFormat.FieldsReader.search(String field, float[] target, KnnCollector knnCollector, Bits acceptDocs) -
Uses of KnnCollector in org.apache.lucene.codecs.simpletext
Methods in org.apache.lucene.codecs.simpletext with parameters of type KnnCollectorModifier and TypeMethodDescriptionvoidSimpleTextKnnVectorsReader.search(String field, byte[] target, KnnCollector knnCollector, Bits acceptDocs) voidSimpleTextKnnVectorsReader.search(String field, float[] target, KnnCollector knnCollector, Bits acceptDocs) -
Uses of KnnCollector in org.apache.lucene.index
Methods in org.apache.lucene.index with parameters of type KnnCollectorModifier and TypeMethodDescriptionvoidSlowCompositeCodecReaderWrapper.SlowCompositeKnnVectorsReaderWrapper.search(String field, byte[] target, KnnCollector knnCollector, Bits acceptDocs) voidSlowCompositeCodecReaderWrapper.SlowCompositeKnnVectorsReaderWrapper.search(String field, float[] target, KnnCollector knnCollector, Bits acceptDocs) final voidCodecReader.searchNearestVectors(String field, byte[] target, KnnCollector knnCollector, Bits acceptDocs) final voidCodecReader.searchNearestVectors(String field, float[] target, KnnCollector knnCollector, Bits acceptDocs) voidDocValuesLeafReader.searchNearestVectors(String field, byte[] target, KnnCollector knnCollector, Bits acceptDocs) voidDocValuesLeafReader.searchNearestVectors(String field, float[] target, KnnCollector knnCollector, Bits acceptDocs) voidExitableDirectoryReader.ExitableFilterAtomicReader.searchNearestVectors(String field, byte[] target, KnnCollector knnCollector, Bits acceptDocs) voidExitableDirectoryReader.ExitableFilterAtomicReader.searchNearestVectors(String field, float[] target, KnnCollector knnCollector, Bits acceptDocs) voidFilterLeafReader.searchNearestVectors(String field, byte[] target, KnnCollector knnCollector, Bits acceptDocs) voidFilterLeafReader.searchNearestVectors(String field, float[] target, KnnCollector knnCollector, Bits acceptDocs) abstract voidLeafReader.searchNearestVectors(String field, byte[] target, KnnCollector knnCollector, Bits acceptDocs) 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 voidLeafReader.searchNearestVectors(String field, float[] target, KnnCollector knnCollector, Bits acceptDocs) 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.voidParallelLeafReader.searchNearestVectors(String fieldName, byte[] target, KnnCollector knnCollector, Bits acceptDocs) voidParallelLeafReader.searchNearestVectors(String fieldName, float[] target, KnnCollector knnCollector, Bits acceptDocs) -
Uses of KnnCollector in org.apache.lucene.index.memory
Methods in org.apache.lucene.index.memory with parameters of type KnnCollectorModifier and TypeMethodDescriptionvoidMemoryIndex.MemoryIndexReader.searchNearestVectors(String field, byte[] target, KnnCollector knnCollector, Bits acceptDocs) voidMemoryIndex.MemoryIndexReader.searchNearestVectors(String field, float[] target, KnnCollector knnCollector, Bits acceptDocs) -
Uses of KnnCollector in org.apache.lucene.search
Classes in org.apache.lucene.search that implement KnnCollectorModifier and TypeClassDescriptionclassAbstractKnnCollector is the default implementation for a knn collector used for gathering kNN results and providing topDocs from the gathered neighbors(package private) classclassTopKnnCollector is a specific KnnCollector.(package private) classPerform a similarity-based graph search.Fields in org.apache.lucene.search declared as KnnCollectorModifier and TypeFieldDescriptionprivate final KnnCollectorTimeLimitingKnnCollectorManager.TimeLimitingKnnCollector.collectorMethods in org.apache.lucene.search that return KnnCollectorModifier and TypeMethodDescriptionTimeLimitingKnnCollectorManager.newCollector(int visitedLimit, LeafReaderContext context) Constructors in org.apache.lucene.search with parameters of type KnnCollector -
Uses of KnnCollector in org.apache.lucene.search.highlight
Methods in org.apache.lucene.search.highlight with parameters of type KnnCollectorModifier and TypeMethodDescriptionvoidTermVectorLeafReader.searchNearestVectors(String field, byte[] target, KnnCollector knnCollector, Bits acceptDocs) voidTermVectorLeafReader.searchNearestVectors(String field, float[] target, KnnCollector knnCollector, Bits acceptDocs) -
Uses of KnnCollector in org.apache.lucene.search.join
Classes in org.apache.lucene.search.join that implement KnnCollectorModifier and TypeClassDescription(package private) classThis collects the nearest children vectors.Methods in org.apache.lucene.search.join that return KnnCollectorModifier and TypeMethodDescriptionDiversifyingNearestChildrenKnnCollectorManager.newCollector(int visitedLimit, LeafReaderContext context) Return a newDiversifyingNearestChildrenKnnCollectorinstance. -
Uses of KnnCollector in org.apache.lucene.search.knn
Classes in org.apache.lucene.search.knn that implement KnnCollectorModifier and TypeClassDescriptionfinal classMultiLeafKnnCollector is a specific KnnCollector that can exchange the top collected results across segments through a shared global queue.Methods in org.apache.lucene.search.knn that return KnnCollectorModifier and TypeMethodDescriptionKnnCollectorManager.newCollector(int visitedLimit, LeafReaderContext context) Return a newKnnCollectorinstance.TopKnnCollectorManager.newCollector(int visitedLimit, LeafReaderContext context) Return a newTopKnnCollectorinstance. -
Uses of KnnCollector in org.apache.lucene.util.hnsw
Classes in org.apache.lucene.util.hnsw that implement KnnCollectorModifier and TypeClassDescriptionstatic final classA restricted, specialized knnCollector that can be used when building a graph.final classWraps a provided KnnCollector object, translating the provided vectorId ordinal to a documentIdFields in org.apache.lucene.util.hnsw declared as KnnCollectorMethods in org.apache.lucene.util.hnsw that return KnnCollectorModifier and TypeMethodDescriptionstatic KnnCollectorHnswGraphSearcher.search(RandomVectorScorer scorer, int topK, OnHeapHnswGraph graph, Bits acceptOrds, int visitedLimit) SearchOnHeapHnswGraph, this method is thread safe.Methods in org.apache.lucene.util.hnsw with parameters of type KnnCollectorModifier and TypeMethodDescriptionprivate intHnswGraphSearcher.findBestEntryPoint(RandomVectorScorer scorer, HnswGraph graph, KnnCollector collector) Function to find the best entry point from which to search the zeroth graph layer.static voidHnswGraphSearcher.search(RandomVectorScorer scorer, KnnCollector knnCollector, HnswGraph graph, Bits acceptOrds) Searches HNSW graph for the nearest neighbors of a query vector.private static voidHnswGraphSearcher.search(RandomVectorScorer scorer, KnnCollector knnCollector, HnswGraph graph, HnswGraphSearcher graphSearcher, Bits acceptOrds) (package private) voidHnswGraphSearcher.searchLevel(KnnCollector results, RandomVectorScorer scorer, int level, int[] eps, HnswGraph graph, Bits acceptOrds) Add the closest neighbors found to a priority queue (heap).Constructors in org.apache.lucene.util.hnsw with parameters of type KnnCollectorModifierConstructorDescriptionOrdinalTranslatedKnnCollector(KnnCollector in, IntToIntFunction vectorOrdinalToDocId)