Biarity/Sieve

Filtering multiple values ​​with "OR" condition does not work

IMSERGIO25 opened this issue · 1 comments

Hello when I want to apply a filter for example "IdProduct==1|2" as the documentation explains, the query generated internally adds the value "or" with a "|" which doesn't work with CosmosDb.

To solve this I had to modify the code and change "Expression.Or" to "Expression.OrElse" in this way the filters are applied perfectly.

image

Perhaps it is not a bug in the Sieve package, but I have not been able to solve it other than making this change, could you confirm if for CosmosDb I should make this change or it should work with the "Or".

Thanks!

Sergio Rodriguez

Same problem happens with AND operator when filtering using multiple parameters in CosmosDB, eg: status==Foo, Title==Bar. We had to make the following change in SieveProcessor.cs:
image