Opened 13 years ago

Closed 13 years ago

#708 closed enhancement (fixed)

Add document and field boosing at index time in Lucene configuration

Reported by: fxp Owned by: geonetwork-devel@…
Priority: major Milestone: v2.7.0
Component: General Version:
Keywords: Cc:

Description

  • Default GeoNetwork lucence configuration does not set any boosts (ie. not changed)
  • This feature has to be used by expert users to alter default search behavior scoring according to catalogue content.
  • Add configuration for boosting fields in lucene-config.xml. Some fields are more important than others. This type of configuration will alter OR queries behavior.
    • Configuration: Example to promote title
      <field name="title" boost="1.5F"/>
      
  • Add configuration for boosting a document in lucene-config.xml.
    • A use case could be: to promote series and not promote datasets part of a series.
    • A sample boosting class is added: ImportantDocument.
    • Boost factor for a document is computed based on document field and value match.
    • Example 1: the following configuration will
      • Default boost is 1
      • Add .1 to a document having type = series
      • Remove .3 to a document having type = service
      • Add .4 to a document having keyword = Elevation
        <boostDocument name="org.fao.geonet.kernel.search.function.ImportantDocument">
            <Param name="fields" type="java.lang.String" value="type,type,keyword"/>
            <Param name="values" type="java.lang.String" value="series,service,Elevation"/>
            <Param name="boosts" type="java.lang.String" value=".1F,-.3F,.4F"/>
        </boostDocument>
        
    • Example 2: to promote series and not promote datasets part of a series:
      <boostDocument name="org.fao.geonet.kernel.search.function.ImportantDocument">
         <Param name="fields" type="java.lang.String" value="type,parentUuid"/>
          <Param name="values" type="java.lang.String" value="series,NOTNULL"/>
          <Param name="boosts" type="java.lang.String" value=".1F,-.3F"/>
      </boostDocument>
      

Attachments (1)

boosting-field-and-doc.patch (20.3 KB ) - added by fxp 13 years ago.

Download all attachments as: .zip

Change History (2)

by fxp, 13 years ago

comment:1 by fxp, 13 years ago

Resolution: fixed
Status: newclosed

Committed revision 8583.

Note: See TracTickets for help on using tickets.