Configuring Sun Master Indexes (Repository)

Defining a Master Index Survivor Strategy for a Field or Object (Repository)

To use a strategy for a specific field other than the strategy defined in the default-survivor-strategy element, you need to specify the new strategy for the appropriate candidate-field element. A candidate-field element can represent a field or child object. You do not need to specify a strategy for any fields that use the default survivor strategy.

ProcedureTo Define a Survivor Strategy for a Field

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

    The file opens in the NetBeans XML editor.

  2. Scroll to the candidate-definitions element in the SurvivorHelperConfig element.

  3. In the candidate-field element for which you want to specify a new strategy, create a new survivor-strategy element.

    For example:


    <candidate-field name="Person.Alias[*].*">
       <survivor-strategy>
       </survivor-strategy>
    </candidate-field>
  4. In the new survivor-strategy element, create and name a new strategy-class element.

    Make sure to specify the fully qualified name of the Java class for the strategy. For example:


    <candidate-field name="Person.Alias[*].*">
       <survivor-strategy>
          <strategy-class>
           com.stc.eindex.survivor.impl.UnionSurvivorStrategy
          </strategy-class>
       </survivor-strategy>
    </candidate-field>

    Note –

    To specify the default survivor strategy for a field, make sure the corresponding candidate-field element does not contain a survivor-strategy element. If you implement a custom strategy class, that class must be defined as a custom plug-in.


  5. Save and close the file.