Configuring Sun Master Indexes

ProcedureTo Add a Query Block (XML Editor)

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

    The file opens in the NetBeans XML editor.

  2. Scroll to the query-builder element that contains the blocking query to configure.

  3. If a config element does not exist for the query, create one between the query-builder tags.

  4. In the config element, create a new block-definition element with a number attribute and assign a unique ID code to the number attribute.

    For example:


       
    <config>
          <block-definition number="ID1">
          </block-definition>
       </config>
    </query-builder>
  5. To add a hint, create and define a new hint element in the new block-definition element.

    The following example illustrates an Oracle hint.


    <config>
       <block-definition number="ID1">
       <hint>FIRST_ROWS_100</hint>
       </block-definition>
    <config>
  6. In the new block-definition element, create a block-rule element.

  7. For each field in the data block, define the elements described in Master Index Query Block Fields and XML Elements.

    For example:


    <config>
       <block-definition number="ID1">
          <hint>FIRST_ROWS_100</hint>
          <block-rule>
             <equals>
                <field>Enterprise.SystemSBR.Person.FirstNamePh</field>
                <source>Person.FirstNamePh</source>
             </equals>
             <equals>
                <field>Enterprise.SystemSBR.Person.LastNamePh</field>
                <source>Person.LastNamePh</source>
             </equals>
             <range>
                <field>Enterprise.SystemSBR.Person.DateOfBirth</field>
                <source>Person.DateOfBirth</source>
                <default>
                   <lower-bound type=”offset”>-5</lower-bound>
                   <upper-bound type=”constant”>2006-01-01
                   </upper-bound>
                </default>
             </range>
          </block-rule>
       </block-definition>
    <config>
  8. Save and close the file.