-
Notifications
You must be signed in to change notification settings - Fork 683
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
Trigram assisted wildcard query and general index efficiency #1794
Comments
@CMajeri here're a few details that should help answering your questions ..
|
Hello,
I'm new to bleve and trying to use it to perform simple substring search, i.e. the equivalent of the sql query
LIKE '%<some_word>%'
.A typical way to achieve this is through the use of trigrams, where we match all entries that contain all trigrams, and then follow that up with a second filter operation.
I tried to replicate this in the
beer-search
context, and came up with this:where "name_tri" is a text mapping, using a trigram as a token filter.
This works perfectly, and doesn't print any rows.
For comparison, without the wildcard query, this prints:
which is expected.
However, I'm unfamiliar with how bleve performs its indexing, and was wondering how well it combines those filters.
Will the presence of the wildcard completely negate the benefits of filtering through trigrams?
In general, how does bleve combine filters, is there any documentation on the subject besides the code?
I'd also be particularly interested in knowing how sorting works, espectially in the context of paginating results (i.e. running the same query many times with different limits and different offsets).
Thanks.
The text was updated successfully, but these errors were encountered: