OpenSearch Vector Search Edition supports multiple data query methods to meet diverse query requirements.
-
Hybrid query: Combines text-based and vector-based retrieval, leveraging both structured and unstructured data to improve the accuracy of query results.
Vectors include dense vectors and sparse vectors. The overall vector score is the sum of the dense vector distance and the sparse vector distance. When using Euclidean distance (SquareEuclidean), a smaller distance between vectors indicates higher similarity.
The text score is determined by keyword matching degree: higher matching produces a higher score. The final composite score is the sum of the vector score and text score. A lower vector score and a higher text score are preferred. A higher composite score indicates greater document relevance. You can configure weights to balance the vector score and text score. For example, you can decrease the vector weight and increase the text weight to achieve better search results.
-
Vector-based query: Import generated vector data into a Vector Search Edition instance and perform vector-based queries.
-
Multi-vector-based query for a single document: Store multiple vectors in a single document's vector field to perform queries.
-
Multi-query: Send multiple query requests at a time to improve query efficiency and response speed.
-
Prediction-based query: Convert text and images into vectors by using the built-in vectorization model, and then use text or images to perform prediction-based queries.
-
Primary key-based query: Identify a document by its unique identifier for efficient data access.
-
Filter expression: Specify filter conditions to narrow down the returned documents.
-
Inverted index: Accelerate full-text queries and quickly locate matching documents to improve query performance.