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? #141

Open
aradalvand opened this issue Oct 8, 2023 · 3 comments
Open

Filtering? #141

aradalvand opened this issue Oct 8, 2023 · 3 comments

Comments

@aradalvand
Copy link

aradalvand commented Oct 8, 2023

Hey there. Doesn't lnx have a filtering feature? I couldn't find any relevant info in the docs/README, and there also doesn't seem to be an issue about this. By filtering I mean being able to narrow down search results based on the value of specific properties (e.g. averageRating > 4, etc.). Meilisearch, Typesense, and so on all do provide some filtering capabilities.

@ChillFish8
Copy link
Collaborator

Hello 👋 Sorry for the long response, been pretty busy.

The filtering is combined into the query system, you can use the normal query parser to build a filter query letting you do:

my_field:[1234 TO 75235], etc... For range queries, etc... See https://docs.rs/tantivy/0.19.2/tantivy/query/struct.QueryParser.html for the full query syntax

@Hades32
Copy link

Hades32 commented May 28, 2024

@ChillFish8 this seems to be recurring issue. Understanding the Lnx search syntax by looking at https://docs.lnx.rs/#tag/Run-searches/operation/Search_Index_indexes__index__search_post or even the Rust docs is basically impossible for mere mortals.

How about you'd add an example for each feature? That would be extremely helpful

@ChillFish8
Copy link
Collaborator

@Hades32 I agree, although I am currently overhauling the existing rest API so it is easier to use, so I will target adding examples for that. Hopefully that should be ready some time next week :)

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

3 participants