I'm calling Azure Search from my c# application.
When I'm trying to filter on the categories of my products it only gives me results when the category doesn't contain any spaces.
search.in(ProductCategory,'Garden') // Works
search.in(ProductCategory,'Sport and Games') // Doesn't Work
search.in(ProductCategory,'Garden, Sport and Games') // Only shows 'Garden' results
The documentation shows that spaces can be used so I'm wondering why I'm not getting any results when I'm using spaces.
$filter=search.in(name, 'Roach motel, Budget hotel') // Sample from docs
It also states that search.in(field, 'one,two,three')
is equal to field eq 'one' or field eq 'two' or field eq 'three'
. But when I use this in my case, so ProductCategory eq 'Sport and Games'
it works.
So I think there is some sort of difference between them. But I can't figure out what it is. I first thought it might has something to do with the field ProductCategory
not being searchable but on the other hand, it works with non-space categories. Also if it acts like an eg
then it's a filter not a search, right..?
Can anybody explain the difference?
For now I'm just creating the filter without the search and just the ProductCategory eq 'Sport and Games or ...'
but this can become very long when someone selects a lot of categories.