Configuring Sun Master Indexes (Repository)

Adding a Query Block to a Master Index Query (Repository)

Some query blocks might be predefined for you based on information you specified in the wizard. You can create additional query blocks for a blocking query.

ProcedureTo Add a Query Block (Configuration Editor)

  1. In the Projects window, right-click the master index application you want to modify, and then click Open.

  2. If the Configuration Editor dialog box appears, click Edit to check out the listed files.

    The Configuration Editor appears.

  3. Click the Query tab.

    The Query page appears.

  4. In the Blocking Queries section, select the query you want to modify and then click Edit.

    The Blocking Query Builder dialog box appears.

  5. In the Block Definitions section, click Add.

    The Block Definition dialog box appears.

  6. In the Block Name field, enter a unique name for the query block.

  7. (Optional) In the Hint field, define an Oracle or SQL Server hint for the query block. For SQL Server, you can only use OPTION hints.

  8. In the Block By section, click Add.

    The Block Rule dialog box appears, where you can specify a field to include in the query block.

  9. Enter values for the fields on the dialog box as described in Master Index Query Block Fields and XML Elements (Repository), and then click OK.

  10. Repeat the previous two steps for each field to add to the query block.

  11. When you are done, click OK on the Block Definition dialog box.

  12. On the Blocking Query Builder dialog box, click OK.

  13. On the Configuration Editor toolbar, click Save.

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 the Candidate Select file.

    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 (Repository).

    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.