-
Notifications
You must be signed in to change notification settings - Fork 59
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
Escaping "=" equal symbols in search using served index #29
Comments
To get the result you expect you need to add quotation marks around your Note it would then still match a doc that contains a space in place of the Finally, if you are performance critical there is also plenty of room to |
Thanks @fulmicoton. That makes sense. I've found that some queries with special characters work as expected (with phrase matching) in CLI, but can not be properly escaped using the For now I've just replaced them with a Thanks! |
That's surprising. In your response payload repeats the query. In your example the = sign was decoded correctly. If you add double quotation marks in your query you don't get the result you expect? |
Hi @fulmicoton, It makes sense what you say about treating I think I'm able to reproduce what I didn't understand, though, sorry in advance if it ends up being some elementary encoding issue!
Attempts to isolate the first document which contains Attempt 1
Attempt 2
Attempt 3
(pause to laugh at https://xkcd.com/1638/) Attempt 4
Attempt 5 - If i replace
|
Thanks for the great bug report. I'll have a look at that soonish! |
I've experienced that searches which contain
=
return too many results. Myq
parameter equals:name=anything
which gets encoded toname%3Danything
when searching via served index.Searching via CLI does not have this issue.
Steps to reproduce:
Download tantivy static binary for macOS
https://github.com/tantivy-search/tantivy-cli/releases/download/0.4.2/tantivy-cli-0.4.2-x86_64-apple-darwin.tar.gz
(can reproduce in linux x86 64 too)
Create new index
Index our two documents from
data.json
Serve index on port 3000
Search for anything containing an equals symbol
Expected Output
Actual Output
The text was updated successfully, but these errors were encountered: