Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#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)

1249.patch (5.6 KB ) - added by fxp 11 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 by fxp, 11 years ago

Owner: changed from geonetwork-devel@… to fxp

by fxp, 11 years ago

Attachment: 1249.patch added

comment:2 by fxp, 11 years ago

Resolution: fixed
Status: newclosed

master commit 1cace58d7d1cdcfb00673aceb6bf1df46f4d5dbe

comment:3 by fxp, 11 years ago

Keywords: EEA added
Note: See TracTickets for help on using tickets.