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

Fluent query building #14

Closed
mikegoatly opened this issue Oct 28, 2019 · 4 comments
Closed

Fluent query building #14

mikegoatly opened this issue Oct 28, 2019 · 4 comments
Labels
enhancement New feature or request

Comments

@mikegoatly
Copy link
Owner

mikegoatly commented Oct 28, 2019

Have a think about what a fluent API for building queries would look like. This would likely be provided as an additional nuget package, e.g. Lifti.FluentQueries.

Perhaps something like:

index.Query().For("search text").And.For("something else").Execute();

index.Query()
    .InField("FieldName", fieldSearch => fieldSearch.For("something").Or.For("another"))
    .Or.InField("FIeld2", fieldSearch => fieldSearch.For("foo"))
    .Execute();
@mikegoatly mikegoatly added the enhancement New feature or request label Oct 28, 2019
@mikegoatly
Copy link
Owner Author

This would allow for queries to be built up dynamically in a reasonably easy way, without having to resort to the raw IQueryPart implementations.

@hamaronooo
Copy link

+1

@mikegoatly
Copy link
Owner Author

I'm starting to look into this now...

mikegoatly added a commit that referenced this issue Mar 3, 2024
@mikegoatly
Copy link
Owner Author

This will be in the 6.3.0 release. Docs are here

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

No branches or pull requests

2 participants