Perform a vector search

The Data Explorer in the Astra Portal lets you view your data, search for similar vectors, and filter by metadata.

Prerequisites

View data in a collection

  1. In the Astra Portal, go to Databases, and then select your database.

  2. Click Data Explorer.

  3. Select the Namespace and Collection with the data you want to view.

Your data is displayed in the Collection Data section. You can toggle between a Table of values and list of JSON documents.

Search your data

Hybrid Search lets you search by vector within your data collection in addition to filtering by key-value.

To try a vector search, click Search on the first document in the Collection Data section. The Vector Search field is populated with the vector from this document, and the database performs a similarity search.

The search uses the similarity metric that you chose when you created the collection.

You can also click content_paste Clipboard to copy the vector for a document, and then paste it into the search field.

Add a metadata filter

To filter your vector search results by the other fields in the collection:

  1. In the Hybrid Search section, click Add Filter.

    The displayed fields are:

    Key

    The name of the field to search on.

    Condition

    The type of filtering to perform. All conditions are case sensitive and must be an exact match.

    • is performs an exact match of a scalar or value within an array.

    • contains performs an exact match of a value within an array.

    See Data API operators for the full list of conditions available in the Data API.

    Value

    The value to filter by.

  2. Configure the filter. For example:

    Filter by is

    Filtering by Key: character, Condition: is, and Value: Lassie returns all documents with a character field set to a scalar value of "Lassie" or set to an array containing a value of "Lassie".

    • This matches the following values: "Lassie", ["Lassie", "Timmy"].

    • This does not match the following values: "lassie", "Lassie Come Home", ["lassie", "Timmy"].

    Filter by contains

    Filtering by Key: color, Condition: contains, and Value: red returns all documents with a color field set to an array containing a value of "red".

    • This matches the following values: ["red", "blue", "green"], ["red"].

    • This does not match the following values: "red", ["reddish", "Red", "Green", "Blue"], ["green", "blue"].

  3. (Optional) Click Add Filter to add more filter criteria.

  4. Click Apply.

    You can also use the dropdown menu to the right of the filter to limit the number of results returned from the vector search.

The Collection Data section is updated with the rows that match your filters.

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com