Class DiversifyingChildrenIVFKnnFloatVectorQuery

java.lang.Object
org.apache.lucene.search.Query
org.elasticsearch.search.vectors.IVFKnnFloatVectorQuery
org.elasticsearch.search.vectors.DiversifyingChildrenIVFKnnFloatVectorQuery
All Implemented Interfaces:
QueryProfilerProvider

public class DiversifyingChildrenIVFKnnFloatVectorQuery extends IVFKnnFloatVectorQuery
  • Field Details

    • field

      protected final String field
    • nProbe

      protected final int nProbe
    • k

      protected final int k
    • numCands

      protected final int numCands
    • filter

      protected final org.apache.lucene.search.Query filter
    • searchStrategy

      protected final org.apache.lucene.search.knn.KnnSearchStrategy searchStrategy
    • vectorOpsCount

      protected int vectorOpsCount
  • Constructor Details

    • DiversifyingChildrenIVFKnnFloatVectorQuery

      public DiversifyingChildrenIVFKnnFloatVectorQuery(String field, float[] query, int k, int numCands, org.apache.lucene.search.Query childFilter, org.apache.lucene.search.join.BitSetProducer parentsFilter, int nProbe)
      Creates a new IVFKnnFloatVectorQuery with the given parameters.
      Parameters:
      field - the field to search
      query - the query vector
      k - the number of nearest neighbors to return
      numCands - the number of nearest neighbors to gather per shard
      childFilter - the filter to apply to the results
      parentsFilter - bitset producer for the parent documents
      nProbe - the number of probes to use for the IVF search strategy
  • Method Details

    • getKnnCollectorManager

      protected org.apache.lucene.search.knn.KnnCollectorManager getKnnCollectorManager(int k, org.apache.lucene.search.IndexSearcher searcher)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class IVFKnnFloatVectorQuery
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class IVFKnnFloatVectorQuery
    • visit

      public void visit(org.apache.lucene.search.QueryVisitor visitor)
      Specified by:
      visit in class org.apache.lucene.search.Query
    • rewrite

      public org.apache.lucene.search.Query rewrite(org.apache.lucene.search.IndexSearcher indexSearcher) throws IOException
      Overrides:
      rewrite in class org.apache.lucene.search.Query
      Throws:
      IOException
    • profile

      public final void profile(QueryProfiler queryProfiler)
      Description copied from interface: QueryProfilerProvider
      Store the profiling information in the QueryProfiler
      Specified by:
      profile in interface QueryProfilerProvider
      Parameters:
      queryProfiler - an instance of KnnFloatVectorField.