Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
IMSERGIO25 opened this issue Nov 18, 2020 · 1 comment · Fixed by #116
Closed

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

IMSERGIO25 opened this issue Nov 18, 2020 · 1 comment · Fixed by #116

Comments

@IMSERGIO25
Copy link

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

@carlesUdG
Copy link

carlesUdG commented Dec 11, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants