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
-
You have loaded data into a collection.
View data in a collection
-
In the Astra Portal, go to Databases, and then select your database.
-
Click Data Explorer.
-
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 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:
-
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.
-
-
Configure the filter. For example:
- Filter by
is
-
Filtering by Key:
character
, Condition:is
, and Value:Lassie
returns all documents with acharacter
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 acolor
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"]
.
-
- Filter by
-
(Optional) Click Add Filter to add more filter criteria.
-
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.