Hi! I've got a products collection and want to fet...
# community-help
h
Hi! I've got a products collection and want to fetch a specific product based on the SKU. I was wondering what is the best approach when using documents.search 1. Use filter_by
Copy code
{
    q: '*',
    filter_by: `sku:=${product.value.sku}`,
    limit: 1,
}
2. Use Query
Copy code
{
    q: product.value.sku,
    query_by: 'sku',
    num_typos: 0,
    limit: 1,
}
f
If you want to fetch that product and that product ONLY, then using
filter_by
is the best approach
h
Thats what i thought, thanks!