cancel
Showing results for 
Search instead for 
Did you mean: 
Generative AI
Explore discussions on generative artificial intelligence techniques and applications within the Databricks Community. Share ideas, challenges, and breakthroughs in this cutting-edge field.
cancel
Showing results for 
Search instead for 
Did you mean: 

Assistance with Combined Filters in Databricks Vector Store Index

kanks987
New Contributor

 

Hi,

I’m working with the Databricks vector store index and need to apply combined filters to retrieve chunks that meet specific criteria.

My index contains the following columns: product_category, product_date, and description.

Question 1: How can I retrieve all chunks that meet this filter criteria:

  • Product category is either:
    • Category 1 with dates from 2015-2016, or
    • All products from Category 2?

Question 2: How can I filter to get only those chunks where the description contains both term1 and term2?

I would appreciate a prompt response.

Helpful links: Databricks API Documentation

Thank you!

2 REPLIES 2

davidhuang
Databricks Employee
Databricks Employee

You can achieve that by using metadata filtering when querying the VS index. Check this section in our VS Index documentation: https://docs.databricks.com/en/generative-ai/create-query-vector-search.html#query-a-vector-search-e...

dh

altaysaid
New Contributor II

How do we do multiple filters? for example I want to filter a vector store by two columns with an AND logic.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group