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

How to nest queries? #119

Open
bielu opened this issue Jun 2, 2024 · 2 comments
Open

How to nest queries? #119

bielu opened this issue Jun 2, 2024 · 2 comments

Comments

@bielu
Copy link

bielu commented Jun 2, 2024

Hi I am writing some search abstraction, where I want to support lifti as well, but I hit issue which might be related to not finding example.

There is example of what I would like to achieve, but couldnt find any code which would suggest if that is possible
image

I noticed there is bracket feature but it allows only to create queries with builder, but I couldn't found way to nest queries 😕

@mikegoatly
Copy link
Owner

Hi @bielu!

So am I understanding it correctly that TranslatedQuery.Value will be some sort of built LIFTI query already, or does it need further translation?

Have a look at this fiddle: https://dotnetfiddle.net/bzSwFC how does that map to your requirements?

The only thing I'd point out is that LIFTI doesn't currently support a "not contains" operator (see #94) - you could fake it by building two queries, one for the includes, one for the excludes, and then filtering out the excluded results from the first set.

@bielu
Copy link
Author

bielu commented Jun 4, 2024

hi @mikegoatly,
Yes queries are already lifti queries, I am creting them based on translations on my subqueries.
About not contains, for now I can just tag it as not supported so Not query would be skipped or i can use your workaround.
Thanks!
will close thread after i get chance to test it ;)

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

No branches or pull requests

2 participants