Uses of Class org.apache.lucene.search.knn.KnnSearchStrategy (Lucene 10.5.1 core API)
Description: use: package: org.apache.lucene.search.knn, class: KnnSearchStrategy

# Uses of Class
org.apache.lucene.search.knn.KnnSearchStrategy

Packages that use KnnSearchStrategy
Package
Description
org.apache.lucene.search
Code to search indices.
org.apache.lucene.search.knn
Classes related to vector search: knn and vector fields.
org.apache.lucene.util.hnsw
Navigable Small-World graph, nominally Hierarchical but currently only has a single layer.

- ## Uses of KnnSearchStrategy in org.apache.lucene.search

  Fields in org.apache.lucene.search declared as KnnSearchStrategy
  Modifier and Type
  Field
  Description
  `protected final KnnSearchStrategy`
  AbstractKnnVectorQuery.`searchStrategy`
  `protected final KnnSearchStrategy`
  AbstractKnnVectorQuery.`searchStrategy`
  `protected final KnnSearchStrategy`
  AbstractKnnVectorQuery.`searchStrategy`
  `protected final KnnSearchStrategy`
  AbstractKnnVectorQuery.`searchStrategy`
  `protected final KnnSearchStrategy`
  AbstractVectorSimilarityQuery.`searchStrategy`
  `protected final KnnSearchStrategy`
  AbstractVectorSimilarityQuery.`searchStrategy`
  Methods in org.apache.lucene.search that return KnnSearchStrategy
  Modifier and Type
  Method
  Description
  `KnnSearchStrategy`
  AbstractKnnCollector.`getSearchStrategy()`
  `KnnSearchStrategy`
  HnswQueueSaturationCollector.`getSearchStrategy()`
  `KnnSearchStrategy`
  KnnCollector.Decorator.`getSearchStrategy()`
  `KnnSearchStrategy`
  KnnCollector.`getSearchStrategy()`
  Methods in org.apache.lucene.search with parameters of type KnnSearchStrategy
  Modifier and Type
  Method
  Description
  `KnnCollector`
  TimeLimitingKnnCollectorManager.`newCollector(int visitedLimit, KnnSearchStrategy searchStrategy, LeafReaderContext context)`
  Constructors in org.apache.lucene.search with parameters of type KnnSearchStrategy
  Modifier
  Constructor
  Description
  `protected`
  `AbstractKnnCollector(int k, long visitLimit, KnnSearchStrategy searchStrategy)`
  ``
  `ByteVectorSimilarityQuery(String field, byte[] target, float resultSimilarity, float decay, Query filter, KnnSearchStrategy searchStrategy)`
  Search for all (approximate) byte vectors above a similarity threshold using `VectorSimilarityCollector`, with a caller-supplied `KnnSearchStrategy`.
  ``
  `FloatVectorSimilarityQuery(String field, float[] target, float resultSimilarity, float decay, Query filter, KnnSearchStrategy searchStrategy)`
  Search for all (approximate) float vectors above a similarity threshold using `VectorSimilarityCollector`, with a caller-supplied `KnnSearchStrategy`.
  ``
  `KnnByteVectorQuery(String field, byte[] target, int k, Query filter, KnnSearchStrategy searchStrategy)`
  Find the `k` nearest documents to the target vector according to the vectors in the given field.
  ``
  `KnnFloatVectorQuery(String field, float[] target, int k, Query filter, KnnSearchStrategy searchStrategy)`
  Find the `k` nearest documents to the target vector according to the vectors in the given field.
  ``
  `TopKnnCollector(int k, int visitLimit, KnnSearchStrategy searchStrategy)`

- ## Uses of KnnSearchStrategy in org.apache.lucene.search.knn

  Subclasses of KnnSearchStrategy in org.apache.lucene.search.knn
  Modifier and Type
  Class
  Description
  `static class`
  `KnnSearchStrategy.Hnsw`
  A strategy for kNN search that uses HNSW
  `static class`
  `KnnSearchStrategy.Patience`
  A strategy for kNN search on HNSW that early exits when nearest neighbor collection rate saturates.
  `static class`
  `KnnSearchStrategy.Seeded`
  A strategy for kNN search that uses a set of entry points to start the search
  Methods in org.apache.lucene.search.knn that return KnnSearchStrategy
  Modifier and Type
  Method
  Description
  `KnnSearchStrategy`
  KnnSearchStrategy.Seeded.`originalStrategy()`
  Original strategy to use after seeding
  Methods in org.apache.lucene.search.knn with parameters of type KnnSearchStrategy
  Modifier and Type
  Method
  Description
  `KnnCollector`
  KnnCollectorManager.`newCollector(int visitedLimit, KnnSearchStrategy searchStrategy, LeafReaderContext context)`
  Return a new `KnnCollector` instance.
  `KnnCollector`
  TopKnnCollectorManager.`newCollector(int visitedLimit, KnnSearchStrategy searchStrategy, LeafReaderContext context)`
  Return a new `TopKnnCollector` instance.
  `default KnnCollector`
  KnnCollectorManager.`newOptimisticCollector(int visitedLimit, KnnSearchStrategy searchStrategy, LeafReaderContext context, int k)`
  Return a new `KnnCollector` instance, generally with a specific k value, scaled per leaf statistics
  `KnnCollector`
  TopKnnCollectorManager.`newOptimisticCollector(int visitedLimit, KnnSearchStrategy searchStrategy, LeafReaderContext context, int k)`
  Constructors in org.apache.lucene.search.knn with parameters of type KnnSearchStrategy
  Modifier
  Constructor
  Description
  ``
  `Seeded(DocIdSetIterator entryPoints, int numberOfEntryPoints, KnnSearchStrategy originalStrategy)`

- ## Uses of KnnSearchStrategy in org.apache.lucene.util.hnsw

  Methods in org.apache.lucene.util.hnsw that return KnnSearchStrategy
  Modifier and Type
  Method
  Description
  `KnnSearchStrategy`
  HnswGraphBuilder.GraphBuilderKnnCollector.`getSearchStrategy()`