![]() The similarity object in effect at indexing computes the length-norm of the field. (with some precision loss of course) and stored in the directory. (so shorter fields are automatically boosted up). That represents the length of that field in that doc The result is multiplied by the boost of the document,Īnd also multiplied by a "field length norm" value all boosts under the same field name in that doc) are multiplied. The directory (when writing the document) in a single byte (!) as follows:įor each field of a document, all boosts of that field Indexing time boosts are preprocessed for storage efficiency and written to during search, by setting a boost on a query clause, calling Lucene allows influencing search results by "boosting" in more than one level:īefore adding a field to the document (and before adding the document to the index). Important because two Documents with the exact same content, but one having the content in two FieldsĪnd the other in one Field will return different scores for the same query due to length normalization Note that Lucene scoring works on Fields and then combines the results to return Documents. tokenized, untokenized, raw data, compressed, etc.) It is important to In Lucene, the objects we are scoring areįields. Which can go a long way in informing why a score is returned. Searcher.explain(Query query, int doc) functionality, So it is important to understand indexing (seeīefore continuing on with this section.) It is also assumed that readers know how to use the Scoring is very much dependent on the way documents are indexed, Will finish up with some reference material in the Appendix. Expert Level which gives details on implementing your own Next it will cover ways you canĬustomize the Lucene internals in Changing your Scoring The rest of this document will cover Scoring basics and how to change your Lucene also adds someĬapabilities and refinements onto this model to support boolean and fuzzy searching, but itĮssentially remains a VSM based system at the heart.įor some valuable references on VSM and IR in general refer to the It uses the Boolean model to first narrow down the documents that need toīe scored based on the use of boolean logic in the Query specification. The number of times the term appears in all the documents in the collection, the more relevant thatĭocument is to the query. Times a query term appears in a document relative to In general, the idea behind the VSM is the more How relevant a given Document is to a User's query. ![]() Help you figure out the what and why of Lucene scoring. While this document won't answer your specific scoring issues, it will, hopefully, point you to the places that can Scores lower than a different document with only one of the query terms. Then we are left digging into Lucene internals or asking for help on to figure out why a document with five of our query terms At least, that is, until it doesn't work, or doesn't work as one would expect it to It is blazingly fast and it hides almost all of the complexity from the user. Lucene scoring is the heart of why we all love Lucene.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |