Class RescoreKnnVectorQuery

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

public class RescoreKnnVectorQuery extends org.apache.lucene.search.Query implements QueryProfilerProvider
Wraps an internal query to rescore the results using a similarity function over the original, non-quantized vectors of a vector field
  • Constructor Summary

    Constructors
    Constructor
    Description
    RescoreKnnVectorQuery(String fieldName, float[] floatTarget, org.apache.lucene.index.VectorSimilarityFunction vectorSimilarityFunction, int k, org.apache.lucene.search.Query innerQuery)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
     
    org.apache.lucene.search.Query
     
    int
    k()
     
    void
    profile(QueryProfiler queryProfiler)
    Store the profiling information in the QueryProfiler
    org.apache.lucene.search.Query
    rewrite(org.apache.lucene.search.IndexSearcher searcher)
     
     
    void
    visit(org.apache.lucene.search.QueryVisitor visitor)
     

    Methods inherited from class org.apache.lucene.search.Query

    classHash, createWeight, rewrite, sameClassAs, toString

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • RescoreKnnVectorQuery

      public RescoreKnnVectorQuery(String fieldName, float[] floatTarget, org.apache.lucene.index.VectorSimilarityFunction vectorSimilarityFunction, int k, org.apache.lucene.search.Query innerQuery)
  • Method Details

    • rewrite

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

      public org.apache.lucene.search.Query innerQuery()
    • k

      public int k()
    • profile

      public 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.
    • visit

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

      public boolean equals(Object o)
      Specified by:
      equals in class org.apache.lucene.search.Query
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in class org.apache.lucene.search.Query
    • toString

      public String toString(String field)
      Specified by:
      toString in class org.apache.lucene.search.Query