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

support wildcard in non-suffix position #5306

Closed
trinity-1686a opened this issue Aug 8, 2024 · 12 comments · Fixed by #5606 · May be fixed by quickwit-oss/tantivy#2568
Closed

support wildcard in non-suffix position #5306

trinity-1686a opened this issue Aug 8, 2024 · 12 comments · Fixed by #5606 · May be fixed by quickwit-oss/tantivy#2568
Labels
enhancement New feature or request

Comments

@trinity-1686a
Copy link
Contributor

currently we allow field:value*, but not field:val*ue

@tandr
Copy link

tandr commented Oct 24, 2024

quickwit went up in ranking for our use case even with some rough corners here and there, evaluation was going great... Until we just to hit the wall with this showstopper. I wish it would be available right now, but alas.

Fellas, any estimate on when this would be available, so we can reevaluate it?

@fmassot
Copy link
Contributor

fmassot commented Oct 25, 2024

@tandr would love to discuss that with you, you can ping me (fmassot) on our discord server.

@tandr
Copy link

tandr commented Oct 28, 2024

Discord does not allow me to use sneakemail.com address (even that I am paying for it), so 🤷
Matrix? Mastodon?

@jlimai
Copy link

jlimai commented Nov 16, 2024

This feature is crucial, and we hope to gain some traction and support for it. Bump

@mzupan
Copy link

mzupan commented Jan 13, 2025

I'm using the latest edge release as of 11 hours ago.. Is there a quick explanation of how to use this? I can't seem to get a wildcard inside a search string to work

@trinity-1686a
Copy link
Contributor Author

you can either build a wildcard query from ES api, or write a query such as field:abc*xyz
see also #5632

@tandr
Copy link

tandr commented Jan 14, 2025

Does this support queries like field:*-something (suffix search, sorry if this is a wrong term for this), or * still cannot be at the beginning of the search term?

@trinity-1686a
Copy link
Contributor Author

it does, though you should avoid doing that, as it is probably the most expensive kind of query you can run right now. The index we use does pruning based on if the start of a token can match the provided query, which you can't do in that case

@tandr
Copy link

tandr commented Jan 14, 2025

Unfortunately, these are the type of queries that we are using a lot :(
I built from "main" d8e98b7 (which, btw, reports version as 0.8), and it complains about query format. For example, query field1:*walk* gives (in UI)

Status: 400
Error: { "message": "failed to parse query: `field1:*walk*`" }

@trinity-1686a
Copy link
Contributor Author

trinity-1686a commented Jan 14, 2025

that's interesting, field1:*walk* doesn't work, but field1:?*walk* does. I assume tantivy query parser doesn't like that *, it thinks that's the start of an exists query

@tandr
Copy link

tandr commented Jan 15, 2025

Thank you for looking into that. But, I don't think I can ask users to "please insert ? before * if your query starts from *", sorry

@tandr
Copy link

tandr commented Jan 15, 2025

omg... that was quick. Not that I understand the fix in tantivy fully, but thank you! Hopefully it will be merged soon, and dependencies will be updated, so I can continue with testing.

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
5 participants