Configuring Sun Master Indexes

Defining Custom Weighted Strategies

The WeightedCalculator element defines both default and custom survivor strategies. You can override the default weighted calculator strategy for specific fields by defining custom strategies for those fields in the candidate-field elements of the WeightedCalculator element.

ProcedureTo Define Custom Weighted Calculators

  1. In the Projects window, expand the Configuration node in the project you want to modify, and then double-click update.xml.

    The file opens in the NetBeans XML editor.

  2. Scroll to the WeightedCalculator element.

  3. Add and name a new candidate-field element in the WeightedCalculator.

    For example:


    <WeightedCalculator module-name="WeightedSurvivorCalculator"
     parser-class=
     "com.sun.mdm.index.configurator.impl.WeightedCalculatorConfig">
       <candidate-field name="Person.DOB">
       </candidate-field>
    
  4. Create one or more parameter elements for the new candidate field.


    <candidate-field name="Person.DOB">
       <parameter>
       </parameter>
       <parameter>
       </parameter>
    </candidate-field>
  5. For each new parameter element, define the elements listed in Master Index Weighted Calculator Parameter Elements.


    <candidate-field name="Person.DOB">
       <parameter>
          <quality>SourceSystem</quality>
          <preference>CDI</preference>
          <utility>80.0</utility>
       </parameter>
       <parameter>
          <quality>MostRecentModified</quality>
          <utility>75.0</utility>
       </parameter>
    </candidate-field>
  6. Save and close the file.