[GeoNetwork-devel] [GeoNetwork opensource Developer website] #1249: Lucene / ImportantDocument boosting class does not work due to Lucene 4.1 update

#1249: Lucene / ImportantDocument boosting class does not work due to Lucene 4.1
update
---------------------+------------------------------------------------------
Reporter: fxp | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: v2.9.0
Component: General | Version: v2.8.0
Keywords: |
---------------------+------------------------------------------------------
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".

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1249&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.