-
-
Notifications
You must be signed in to change notification settings - Fork 721
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
Panic occured while committing writer with sort by text field. #2335
Comments
sort by is only supported on numerical fields. Why do you want to sort by text field? |
Because my source data is from MongoDB. Its id field is ObjectId type, and there is no way to store ObjectId type as a number to tantivy. Therefore, I use text to store the id field. For keeping the order, I would like to sort by the id field with text type. |
I suggest we just remove the ability to sort the index by something. It has brought more bugs, confusion than any other feature. |
Because tantivy has its own docId field, and tantivy's interface does not provide a save method (override by query). This leads to the confusion of query results in concurrent testing (single-threaded modification + multithreaded query). So, I think index sort is necessary. |
I don't understand your sentence. |
Why do you want to keep order in the tantivy index?
I also don't think the maintenance cost of it justifies potential gains currently. In practice there's little to no benefit, but some confusion about it. Tantivy users may have custom queries on top of sorting. Hard to tell if and how they use it, but only performance should be affected when removing it. If we decide to remove it I would add a deprecation warning in the upcoming release. |
Which version of tantivy are you using?
tantivy v0.21.1
To Reproduce
The text was updated successfully, but these errors were encountered: