Hi there,
I'm currently using App Search with search-ui react library.
I'm looking for a way to apply boolean logic to the filters inside my searchQuery config.
Let's say I have 10 documents in my search engine.
Each document represents a coffee shop that has 2 fields: "shop_name" and "shop_country"
For those 10 documents: there are 5 coffee shops in the US, 3 shops in Canada, and 2 shops in Europe.
What would be the best way to query for coffee shops in North America (US + Canada)?
Let's say I'm passing this config prop into SearchProvider:
const config = {
searchQuery: {
facets: buildFacetConfigFromConfig(),
disjunctiveFacets: [],
filters: [{ field: 'shop_country', values: ['US'] }],
},
apiConnect: newAppSearchAPIConnector({...}),
}
<SearchProvider config={config}>...</SearchProvider>
Is there a way to apply an "OR" condition to filters?
Or would I have to add shop_country as a facet, and make it disjunctive? But then how can I filter for 2 values?
Or would I have to change the schema and add a new field like 'north_america': 'true' ? and query for that specific field?
Thanks for the help in advance!!