Filtering documents containing "Durian BID" in description using filter_type `contains`.Filtering documents containing "Durian BID" in description using filter_type `contains`.

Filtering documents containing "Durian BID" in description using filter_type contains.

contains

This filter returns a document only if it contains a string value. Note that substrings are covered in this category. For instance, if a product name is composed of a name and a number (e.g. ABC-123), one might remember the name but not the number. This filter can easily return all products including the ABC string.
Note that this filter is case-sensitive.

from relevanceai import Client 
client = Client()

filter =  [{'field' : 'description',           # field to look at
            'filter_type' : 'contains', 
            "condition":"==", 
            "condition_value":"Durian BID"}]  # searching for "Durian BID" 
filtered_data = client.datasets.documents.get_where(dataset_id, filter)

Did this page help you?