-
-
Notifications
You must be signed in to change notification settings - Fork 712
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
Make it possible to index a field without fieldnorms #922
Comments
Hi, I started working on this here: #1001 I didn't see the previous work on 7cb018c and I took a different approach. In previous work, the data is serialized even if field has no fieldnorm. In mine, I didn't serialize the fieldnorm if there is none for the field (https://github.com/lpouget/tantivy/blob/784c9a4afade9f72456f8368e9687e85b0d5fcaa/src/indexer/segment_writer.rs#L215). It's implies you didn't always have a fieldnorm reader (or have an empty default one). Is it too radical ? |
Your approach is better! Let's forget my previous work and let me review your code tomorrow. |
Thx but I have a little problem with my approach :D Idk how to handle this method with my approach:
because I will have an empty and btw just wait I remove the draft flag before reviewing because I want to use your approach to handle the option. |
First of all explanation about what this ufnction is about. It computes an approximate overall number of tokens for a field in a given segment when there is a merge. It makes it possible to compute the average fieldnorm for bm25. This value is approximate after a merge because it relies on fieldnormid which itself encodes the fieldnorm in a single byte, using some kind of logarithmic scale. Now that what it is... Is it legitimate for a user to disable fieldnorm and still try to use BM25? One thing we could do is, when there are no fieldnorm availabe, to extrapolate the total_num_tokens using the previous total_num_tokens and their number of deletes. In other word, Here num_doc and max_doc refer to methods you have in SegmentReader mean respectively.
|
Closed see #1001 |
Right now indexed fields come with a fieldnorm. This fieldnorm is used for BM25 scoring.
Bm25 is not always relevant. This ticket is about adding an indexing option for which fieldnorm data is not retained.
The text was updated successfully, but these errors were encountered: