Module org.elasticsearch.server
Package org.elasticsearch.search.vectors
Class LookupQueryVectorBuilder
java.lang.Object
org.elasticsearch.search.vectors.LookupQueryVectorBuilder
- All Implemented Interfaces:
NamedWriteable,VersionedNamedWriteable,Writeable,QueryVectorBuilder,ToXContent,ToXContentObject
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ParseFieldstatic final ParseFieldstatic final TransportVersionstatic final ParseFieldstatic final ParseFieldstatic final ParseFieldFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionLookupQueryVectorBuilder(String id, String index, String path, String routing) Create a new LookupQueryVectorBuilder -
Method Summary
Modifier and TypeMethodDescriptionvoidbuildVector(Client client, ActionListener<float[]> listener) Method for building a vector via the client.booleanstatic LookupQueryVectorBuilderfromXContent(XContentParser parser) getId()getIndex()The minimal version of the recipient this object can be sent to.getPath()Returns the name of the writeable objectinthashCode()toXContent(XContentBuilder builder, ToXContent.Params params) voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragmentMethods inherited from interface org.elasticsearch.common.io.stream.VersionedNamedWriteable
supportsVersion
-
Field Details
-
LOOKUP_QVB_TV
-
NAME
-
ID_FIELD
-
INDEX_FIELD
-
PATH_FIELD
-
ROUTING_FIELD
-
-
Constructor Details
-
LookupQueryVectorBuilder
Create a new LookupQueryVectorBuilder- Parameters:
id- the document id to lookupindex- the index where the document is storedpath- the path to the vector field in the documentrouting- the routing value to use when looking up the document (can be null)
-
LookupQueryVectorBuilder
- Throws:
IOException
-
-
Method Details
-
fromXContent
- Throws:
IOException
-
getId
-
getIndex
-
getPath
-
getRouting
-
buildVector
Description copied from interface:QueryVectorBuilderMethod for building a vector via the client. This method is called during RewriteAndFetch. 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- Specified by:
buildVectorin interfaceQueryVectorBuilder- Parameters:
client- for performing asynchronous actions against the clusterlistener- listener to accept the created vector
-
getWriteableName
Description copied from interface:VersionedNamedWriteableReturns the name of the writeable object- Specified by:
getWriteableNamein interfaceNamedWriteable- Specified by:
getWriteableNamein interfaceVersionedNamedWriteable
-
getMinimalSupportedVersion
Description copied from interface:VersionedNamedWriteableThe minimal version of the recipient this object can be sent to. SeeVersionedNamedWriteable.supportsVersion(TransportVersion)for the default serialization check.- Specified by:
getMinimalSupportedVersionin interfaceVersionedNamedWriteable
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
equals
-
hashCode
public int hashCode()
-