Configuring Sun Master Indexes (Repository)

Modifying Master Index Queries (Repository)

By default, two basic queries and one blocking query are predefined in the Candidate Select file and you can create additional queries. Once a query is defined, you can modify it as needed. If you make changes to a query defined for a search in the EDM, you might need to modify the search definition in the Enterprise Data Manager file. For example, if you deselect the Use Wildcard option for a query and the wildcard feature is enabled for that query in the EDM, you need to disable that feature in the Enterprise Data Manager file.

You can customize the queries used in your implementation by performing any of the following actions.

Modifying a Master Index Query (Repository)

Once you define a basic query, you can modify the attributes and parameters for that query. If you defined a custom query, you might need to modify certain elements of the query directly in the XML file instead of through the Configuration Editor.

ProcedureTo Modify a Basic Query (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. Do one of the following:

    • To modify a blocking query, select the query to modify in the Blocking Queries section, and then click Edit.

      The Blocking Query Builder dialog box appears.

    • To modify a basic query, select the query to modify in the Basic Queries section, and then click Edit.

      The Basic Query Builder dialog box appears.

  5. Modify any of the fields and configuration options described in Master Index Query Builder Dialog Box Fields and XML Elements (Repository).

  6. For blocking queries, you can modify query blocks by performing any of the following procedures:

  7. When you are done editing the query, click OK.

  8. On the Configuration Editor toolbar, click Save.

ProcedureTo Modify a Query (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 query you want to modify.

  3. Modify any of the attributes listed in Master Index Query Builder Dialog Box Fields and XML Elements (Repository).

    For example:


    <query-builder name="ALPHA-SEARCH" class=
      "com.stc.eindex.querybuilder.MyQueryBuilder" 
      parser-class=
      "com.stc.eindex.configurator.impl.querybuilder.KeyValueConfiguration"
       standardize="true" phoneticize="false">
    </query-builder>
  4. To add a new query parameter (for custom query builders only):

    1. Add a new config element between the query-builder tags.

    2. In the new config element, create an option element and then define key and value attributes for the new element.

      For example:


      <config>
       <option key="SearchAlias" value="true"/>
      </config>

      See Master Index Query Builder Dialog Box Fields and XML Elements (Repository) for information about the key and value pairs available to the default basic queries.

  5. To modify a parameter, scroll to the option element that defines the parameter and then change the value of the value attribute.

  6. To delete a parameter, scroll to the config element of that query, and then delete the option element containing the parameter to remove.

    For example, to remove the SearchAlias parameter in the following sample, delete the boldface text.


    <config>
       <option key="SearchAlias" value="true"/>
     <option key="UseWildCard" value="false"/>
    </config>
  7. For blocking queries, you can modify query blocks by performing any of the following procedures:

  8. Save and close the file.

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.

Modifying a Query Block for a Master Index Query (Repository)

Once block definitions are created for a blocking query, you can modify those definitions if needed. You can add, modify, and remove block fields. When adding or removing fields from a query block, verify that the query will still include all the needed fields.

ProcedureTo Modify 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, select the block to modify and then click Edit.

    The Block Definition dialog box appears.

  6. Do any of the following:

  7. When you are done modifying the query block, click OK.

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

  9. On the Configuration Editor toolbar, click Save.

ProcedureTo Modify 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 block-rule element containing the query block you want to modify.

  3. To add a new blocking field, add and populate the elements described in Master Index Query Block Fields and XML Elements (Repository).

    For example:


    <block-rule>
      <equals>
       <field>Enterprise.SystemSBR.Person.DOB</field>
       <source>Person.DOB</source>
      </equals>
      ...
  4. To edit an existing field, modify any of the elements described in Master Index Query Block Fields and XML Elements (Repository).

  5. To delete an existing field, delete all text between and including the search type elements that define the field (such as equals, range, not-equals, and so on).

    For example, to delete the DOB field defined above, you would delete the text between and including the equals elements.

  6. Save and close the file.

Deleting a Query Block From a Master Index Query (Repository)

Once you create a block definition, you can delete it if needed. When deleting a query block, verify that the query will still include all the needed fields.

ProcedureTo Delete 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, select the definition you want to delete.

  6. Click Remove.

  7. On the confirmation dialog box, click Yes.

  8. On the Configuration Editor toolbar, click Save.

ProcedureTo Delete 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 modify.

  3. In that query-builder element, delete all text between and including the block-definition element defining the data block to remove.

    For example, in the sample below, to delete the SSN block you would delete the boldface text.


    <config>
       <block-definition number="ID000007">
          <block-rule>
             <equals>
                <field>Enterprise.SystemSBR.Person.SSN</field>
                <source>Person.SSN</source>
             </equals>
          </block-rule>
       </block-definition>
     <block-definition number="ID000008">
     <block-rule>
              <equals>
                 <field>Enterprise.SystemSBR.Person.DOB</field>
                 <source>Person.DOB</source>
              </equals>
     </block-rule>
     </block-definition>

    Note –

    Each blocking query must contain one config element, and the config element must contain at least one block definition.


  4. Save and close the file.