Consider an Algolia index filled with objects like this:
{
"objectID": 1,
"name": "My project title",
"contributor_ids": [12, 42, 34]
}
Does this query get all objects that have contributor_ids 42 OR contributor_ids=12 ?
"numericFilters: 'contributor_ids=42, contributor_ids=12"
And if so, what is the right query to get all objects that have contributor_ids 42 AND contributor_ids=12 ?
The default behavior is a AND, you can have a OR with parenthesis:
numericFilters: "contributor_ids=42, contributor_ids=12"
Means contributor_ids=42 AND contributor_ids=12, only match if you have a record containing both values
numericFilters: "(contributor_ids=42, contributor_ids=12)"
Means contributor_ids=42 OR contributor_ids=12
numericFilters: "contributor_ids=10,(contributor_ids=42, contributor_ids=12)"
Means contributor_ids=10 AND (contributor_ids=42 OR contributor_ids=12)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With