This shows you the differences between two versions of the page.
admin:indexing:indexes:groups [2011/01/21 00:47] els |
admin:indexing:indexes:groups [2016/06/28 22:38] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | {{page>:top_add&nofooter&noeditbtn}} | ||
- | ====== Administration: Omnidex Indexing ====== | ||
- | |||
- | ===== Indexing Types and Options ===== | ||
- | |||
- | [[admin:indexing:indexes:home|Overview]] | | ||
- | [[admin:indexing:indexes:types|Index Types]] | | ||
- | [[admin:indexing:indexes:options|Index Options]] | | ||
- | **[[admin:indexing:indexes:groups|Index Groups]]** | ||
- | |||
- | ==== Index Groups ==== | ||
- | |||
- | Index Groups are used to combine multiple indexes into one single index. This allows a search against any one index within the group to automatically search all indexes within the group. For example, if a table has three lines, ADDRESS_LINE_1, ADDRESS_LINE_2 and ADDRESS_LINE_3, they can be indexed as an Index Group. Criteria against any one of those three columns will automatically search all address lines. | ||
- | |||
- | In the example below, a row displays an address: | ||
- | |||
- | ADDRESS_LINE_1 1254 Broadway Street | ||
- | ADDRESS_LINE_2 Suite 100 | ||
- | ADDRESS_LINE_3 Yonkers, NY 10710 | ||
- | |||
- | If these three columns are added to an Index Group, then the following search will locate the row: | ||
- | |||
- | select NAME, ADDRESS_LINE_1, ADDRESS_LINE_2, ADDRESS_LINE_3 | ||
- | from CUSTOMERS | ||
- | where ADDRESS_LINE_1 = '1254 Broadway, Yonkers, NY' | ||
- | |||
- | Care should be taken when considering where to use Index Groups. When indexes are combined into an Index Group, they lose the ability to distinguish which column originally contained the values. This can lead to confusion. For example, the following search will also locate the row: | ||
- | |||
- | select NAME, ADDRESS_LINE_1, ADDRESS_LINE_2, ADDRESS_LINE_3 | ||
- | from CUSTOMERS | ||
- | where ADDRESS_LINE_1 = '10710 Yonkers Street Suite 100' | ||
- | |||
- | === Common Uses of Index Groups === | ||
- | |||
- | Index Groups can be used in many different situations. Here is a little of common situation where Index Groups are used: | ||
- | |||
- | * Combining indexes for multiple address lines | ||
- | * Combining indexes for a short-description column and a long-description column. | ||
- | * Combining indexes for given names, nicknames and aliases | ||
- | * Combining indexes for multiple telephone numbers | ||
- | * Combining indexes for multiple email addresses | ||
- | * Combining indexes for multiple SIC or NAICS codes, or similar identifiers | ||
- | |||
- | === Index Groups with Multiple Tables === | ||
- | |||
- | Index Groups can combine indexes from multiple pre-joined tables. This can be particularly valuable when a search in a parent table needs to also search a child table at the same time. In this example, a HOUSEHOLDS table has a primary phone number and an INDIVIDUALS table has a mobile phone number for each member of the household. | ||
- | |||
- | Parent row: | ||
- | |||
- | HOUSEHOLDS.HOUSEHOLD 1234 | ||
- | HOUSEHOLDS.HOME_PHONE 303 449 2198 | ||
- | |||
- | Child row: | ||
- | |||
- | INDIVIDUALS.HOUSEHOLD 1234 | ||
- | INDIVIDUALS.INDIVIDUAL 5678 | ||
- | INDIVIDUALS.MOBILE_PHONE 720 298 3162 | ||
- | |||
- | Child row: | ||
- | |||
- | INDIVIDUALS.HOUSEHOLD 1234 | ||
- | INDIVIDUALS.INDIVIDUAL 5679 | ||
- | INDIVIDUALS.MOBILE_PHONE 720 675 2238 | ||
- | |||
- | |||
- | If HOUSEHOLDS.HOME_PHONE and INDIVIDUALS.MOBILE_PHONE were added to an Index Group, then HOUSEHOLD 1234 would be returned in the following query. Note that the criteria is searching the INDIVIDUALS table **even though the INDIVIDUALS table is not referenced in the query.** | ||
- | |||
- | select HOUSEHOLD, ADDRESS, CITY, STATE, ZIP | ||
- | from HOUSEHOLDS | ||
- | where HOME_PHONE = '720 298 3162' | ||
- | |||
- | As discussed above, care should be taken when considering where to use Index Groups across tables. It can be confusing that when a table is searched without it being included in the SQL statement. A row can also be qualified when a portion of the criteria exists in the parent and another portion exists in a child row. For example, the following search will also locate HOUSEHOLD 1234: | ||
- | |||
- | select HOUSEHOLD, ADDRESS, CITY, STATE, ZIP | ||
- | from HOUSEHOLDS | ||
- | where HOME_PHONE = '303 298 2238' | ||
- | |||
- | Because of this characteristic, Index Groups are best suited for Omnidex Indexes, or QuickText Indexes containing free-form text where the location of keywords is not material. Index Groups also work well when combining columns with data that is so different it would never lead to confusion. | ||
- | |||
- | ==== ==== | ||
- | |||
- | **[[admin:indexing:indexes:options|Prev]]** | ||
- | |||
- | ====== Additional Resources ====== | ||
- | |||
- | See also: | ||
- | |||
- | {{page>:admin:indexing:see_also&nofooter&noeditbtn}} | ||
- | |||
- | {{page>:bottom_add&nofooter&noeditbtn}} |