API search query syntax #157
-
Hi! I'm having a hard time finding any useful documentation about the query syntax. Would be very nice to get some documentation on how to query an index beyond the super basic query, and how to use operands (AND, OR). Somewhere else, I found this example:
When I test the above example I get all results that matches line a OR line b, so the first line is not actually a filter as stated in the comment.
It seems to look at lot like SQL syntax, so I can also add multiple operands like this:
I would love if someone could show more advanced usage, using wildcards and NOT statements... Anyone? @ChillFish8 ? :D As an example, Excel documents could be .xls or .xlsx and even other file extensions... Without being able to use a wildcard, I'll need to search with a query like this:
Adding a star (fileextension:xls*) returns no results, while fileextension:* returns ALL file type results. Seems like either I'm missing something, or the wildcard doesn't really work. My target users are VERY pleased with LNX-search, saying it's super fast! 🥇 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The Unfortunately, ATM 0.9 uses an old version of tantivy which means you can't do your example like |
Beta Was this translation helpful? Give feedback.
The
normal
query mode uses the Tantivy parser syntax: https://docs.rs/tantivy/0.18.1/tantivy/query/struct.QueryParser.htmlUnfortunately, ATM 0.9 uses an old version of tantivy which means you can't do your example like
fileextension:xls*
(which is would be a prefix match in newer versions of tantivy)