OpenSearch Query
Overview
You can use this Snap to execute a query on the specified OpenSearch index.
- Read-type Snap
- Works in Ultra Tasks
Prerequisites
- A valid account with the required permissions.
Limitations and known issues
None.
Snap views
View | Description | Examples of upstream and downstream Snaps |
---|---|---|
Input | This Snap has at the most one document input view. The input requires the OpenSearch index and vector name. | Mapper |
Output | This Snap has at the most one document output view. The Snap retrieves the top matching vectors close to a specific vector in the OpenSearch index and outputs the corresponding mapping for those matching vectors (if required). | Mapper |
Error |
Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter when running the pipeline by choosing one of the following options from the When errors occur list under the Views tab. The available options are:
Learn more about Error handling in Pipelines. |
Snap settings
- Suggestion icon (): Indicates a list that is dynamically populated based on the configuration.
- Expression icon (): Indicates whether the value is an expression (if enabled) or a static value (if disabled). Learn more about Using Expressions in SnapLogic.
- Add icon (): Indicates that you can add fields in the field set.
- Remove icon (): Indicates that you can remove fields from the field set.
Field / Field set | Type | Description |
---|---|---|
Label | String |
Required. Specify a unique name for the Snap. Modify this to be more appropriate, especially if more than one of the same Snaps is in the pipeline. Default value: OpenSearch Query Example: TextSimilarityDocument |
Index name | String/Expression/Suggestion |
Required. Specify the name of the OpenSearch index from which you want to query records. Default value: N/A Example: document_embeddings |
Vector field name | String/Expression/Suggestion | Specify the name of the vector field. Note: Index
name must be defined to populate the suggestions in this
field.
Default value: N/A Example: embedding_vector |
Top K | String/Expression | Required. Specify the maximum number of matches to retrieve per query result. This field processes samples exclusively from the top k options for each subsequent token. Default value: 4 Example: 5 |
Include vector | Checkbox/Expression | Select this checkbox to include the vectors in the response. Note: You can
use the expression enabler to fetch values from pipeline parameters that
evaluate to either true or false. Default status: Deselected |
Include ID | Checkbox/Expression | Select this checkbox to include the ID in the response. Note: You can use
the expression enabler to fetch values from pipeline parameters that evaluate to
either true or false. Default status: Selected |
Include score | Checkbox/Expression | Select this checkbox to include the score in the response. Note: You can
use the expression enabler to fetch values from pipeline parameters that
evaluate to either true or
false. Default status: Selected |
Search method and space type | Choose your k-NN Search method and space type configuration. | |
Search method | Dropdown list |
Required. Choose the method for obtaining the k-nearest
neighbors from an index of vectors. Available options include:
Default value: Approximate k-NN Example: Painless Extension k-NN |
Painless extension k-NN function type | Dropdown list |
Appears when you select Painless extension k-NN for the Search method. Required. Choose the painless function type based on your data characteristics and search requirements. Available options include:
Learn more about Function types. Default value: l2Squared Example: cosineSimilarity |
Script score k-NN space type | Dropdown list |
Appears when you select Script score k-NN for the Search method. Required. Choose the space type based on your data characteristics and search requirements. Available options include:
Learn more about Space type. Default value: l1 Example: innerproduct |
Snap execution | Dropdown list |
Select one of the three modes in which the Snap executes.
Available options are:
Default value: Validate & Execute Example: Execute only |