Exact match

Filtering documents with "Durian Leather 2 Seater Sofa" as the product_name.Filtering documents with "Durian Leather 2 Seater Sofa" as the product_name.

Filtering documents with "Durian Leather 2 Seater Sofa" as the product_name.

exact_match

This filter works with string values and only returns documents with a field value that exactly matches the filtered criteria. For instance under filtering by 'Samsung galaxy s21', the result will only contain products explicitly having 'Samsung galaxy s21' in their specified field. Note that this filter is case-sensitive.

from relevanceai import Client 
client = Client()

filter =  [{'field' : 'product_name',              # field to look at
            'filter_type' : 'exact_match', 
            "condition":"==", 
            "condition_value":"Durian Leather 2 Seater Sofa"}]  # searching for "Durian Leather 2 Seater Sofa"
filtered_data = client.datasets.documents.get_where(dataset_id, filter)

Did this page help you?