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

Addition of a migration guide from Lucene to Tantivy #2377

Open
beneyal opened this issue Apr 24, 2024 · 2 comments
Open

Addition of a migration guide from Lucene to Tantivy #2377

beneyal opened this issue Apr 24, 2024 · 2 comments

Comments

@beneyal
Copy link

beneyal commented Apr 24, 2024

Hello,

As a side-project for work, I would like to port our current application, which is written in Scala and uses Lucene 9.5, to Rust and Tantivy. However, I don't know if all the features I need from Lucene exist in Tantivy. It would be great to have a side-by-side migration guide from Lucene to Tantivy specifying how to "map" different Lucene constructs to Tantivy and which ones are not (yet?) available.

For example, we're using SpanQuerys in Lucene, and neither could I find an equivalent construct in Tantivy nor perhaps a tutorial on how to write something similar using existing Tantivy constructs. I believe knowing what isn't available is just as important as knowing what is 😃

Thanks for reading, and I look forward to seeing how this project evolves! 🚀

@PSeitz
Copy link
Contributor

PSeitz commented Apr 24, 2024

What kind of SpanQuery do you use?

We support phrase query with slop, but there is no such low level building block for spans.
https://docs.rs/tantivy/latest/tantivy/query/struct.PhraseQuery.html#method.set_slop

@beneyal
Copy link
Author

beneyal commented Apr 24, 2024

Many of them 😅

Just some I see in the code are: SpanNearQuery, SpanTermQuery, SpanMultiTermQueryWrapper, SpanContainingQuery, and SpanOrQuery. And there's another one that is a custom implementation inheriting SpanQuery. But it's not just SpanQuery, that was just an example, we have other custom stuff inheriting Lucene classes, which is why I said that a mapping could be helpful. We plan to open source that project soon (🤞) and then I'll be able to show precisely what we're doing there.

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

2 participants