Interface QueryVectorBuilder

All Superinterfaces:
NamedWriteable, ToXContent, ToXContentObject, VersionedNamedWriteable, Writeable

public interface QueryVectorBuilder extends VersionedNamedWriteable, ToXContentObject
Provides a mechanism for building a KNN query vector in an asynchronous manner during the rewrite phase
  • Method Details

    • buildVector

      void buildVector(Client client, ActionListener<float[]> listener)
      Method for building a vector via the client. This method is called during RerwiteAndFetch. Typical implementation for this method will: 1. call some asynchronous client action 2. Handle failure/success for that action (usually passing failure to the provided listener) 3. Parse the success case and extract the query vector 4. Pass the extracted query vector to the provided listener
      Parameters:
      client - for performing asynchronous actions against the cluster
      listener - listener to accept the created vector