Filtering documents based on their id.Filtering documents based on their id.

Filtering documents based on their id.

ids

This filter returns documents whose unique id exists in a given list. It may look similar to 'categories'. The main difference is the search speed.

from relevanceai import Client 
client = Client()

filter =  [{'field' : '_id',     # field to look at
            'filter_type' : 'ids', 
            "condition":"==", 
            "condition_value":"7790e058cbe1b1e10e20cd22a1e53d36"}]
filtered_data = client.datasets.documents.get_where(dataset_id, filter)

Did this page help you?