#1249 closed defect (fixed)
Lucene / ImportantDocument boosting class does not work due to Lucene 4.1 update
Reported by: | fxp | Owned by: | fxp |
---|---|---|---|
Priority: | major | Milestone: | v2.10.0 RC0 |
Component: | General | Version: | v2.8.0 |
Keywords: | EEA | Cc: |
Description
Due to Lucene 4.1 changes in the API.
If you previously used Document.setBoost, you must now pre-multiply the document boost into each Field.setBoost.
Applied on Lucene update but need some fix.
The class needs to loop over the xml to be indexed instead of the (now empty) doc to properly compute the boost factor for the document. Then boost could be applied to all fields using Field.setBoost instead of Document.setBoost.
Also boost is always set to 1 https://github.com/geonetwork/core-geonetwork/blob/master/web/src/main/java/org/fao/geonet/kernel/search/SearchManager.java#L1409
We need to avoid "java.lang.IllegalArgumentException: You cannot set an index-time boost on an unindexed field, or one that omits norms".
Attachments (1)
Change History (4)
comment:1 by , 12 years ago
Owner: | changed from | to
---|
by , 12 years ago
Attachment: | 1249.patch added |
---|
comment:2 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 by , 12 years ago
Keywords: | EEA added |
---|
master commit 1cace58d7d1cdcfb00673aceb6bf1df46f4d5dbe