Performing searches on multiple forms


The AR System Multi-Form Search (MFS) form serves as an interface or API for AR System server applications to perform searches on multiple forms within the system. If you search from a global search field, such as RKMs search, or the global searches supplied by ITSM applications, MFS search is triggered.

The Multi-form search behavior is as follows:

  • MFS does not consider field permissions. When you perform a multi-form search, the result is displayed based on your permissions. Extended field permissions can influence the search result.

For example, Field 1 has permission to Group 1, and Field 2 has permission to Group 2. User 1 is a member of Group 1 but not a member of Group 2. If User 1 searches for a value from Field 1 using MFS:MultiFormSearch, no search results are returned.

  • The search string has a limit of 1000 characters. This protects the system performance from unwanted large queries.
    If you have a long search string, exceeding 1000 characters, the first 1000 characters fetch the most relevant results.

Use the following tabs on the AR System Multi-Form Search form to set up a multiple-form search:


    • Search Terms—Enter the terms to search for.
    • Filter—Enter criteria to limit or filter the entries to be searched.
    • Result Data—Enter the additional information you want to be returned to users, beyond the standard results after they run a search.

Important

A Full Text Search adds wildcards to search strings, but wildcards are not used in searches across multiple forms.

For example, if you search for doc with a full text search, the percent wildcard (%) is added before and after the string, for example, %doc%. The results can include strings such as Doctor, Dock, doctrine, and haddock.

Conversely, for searches across multiple forms, wildcards are not added. It is assumed that the applications know what the actual terms are because the application is already using full text search and controlling it more closely.

Entering search terms

The Search Terms tab contains fields in which your application will place text, which will be searched across all FTS-indexed forms and fields, and to which the user has permissions unless limited to a subset as defined on the Filter tab. For more information, see Entering search criteria.

The fields on the Search Terms tab as shown in the following image are:

  • Must Have
    All words given in the search term must match.
  • May Have
    Any word/words given in the search term should match.
  • Must Not Have
    None of the words given in the search term should match.

The search term has a limit of 32 words. For example, if you use a search term that includes 40 words, only 32 words are considered while performing a search.

22_1_MFS_search_terms_tab.png

All the fields are optional, but the Must Have or May Have field must include data to obtain search results. Additionally, the Must Have or May Have field must include data if the Must Not Have field is supplied with a value.

Consider the following points while constructing a query:

  • You can construct a parenthetical, AND, OR, and NOT queries within the Must Have, May Have, and Must Not Have fields. For example, in the May Have field, you can construct a complex parenthetical query such as:
(keyboard OR mouse) AND computer AND NOT printer
Example

For complex parenthetical queries constructed within the Must Have or May Have fields, you obtain different results.

For example, if you run the query (keyboard OR mouse) AND computer AND NOT printer, and the database contains records such as:

Record 1 - Keyboard

Record 2 - Mouse

Record 3 - Printer

Record 4 - Computer

Record 5 - Keyboard, Mouse, Computer

Record 6 - Keyboard, Mouse, Computer, Printer

The results returned are:

For May Have field: Record 1, Record 2, Record, 4

Count: 3 (The records containing any of the three strings are shown in the results)

For Must Have field: Record 5

Count: 1 (The records containing all three strings together are shown in the results)

  • You can shorten AND NOT to NOT. This returns a result where the entries searched must have a computer, must also have either a keyboard or a mouse, and must not have a printer.
  • If you perform an accrue type search in the May Have field, such as keyboard,mouse,computer, the search results contain keyboard, mouse or computer. If you use the same accrue search in the Must Have field, the search results contain only entries that contain all the three keywords.
  • If the May Have field and Must Have fields each contain a term, the only entries returned are entries that match the Must Have field. However, any entries that also contain the words in the May Have field have a higher score than entries that contain only words found in the Must Have field. For example, if keyboard is in the May Have field and mouse in the Must Have field, all entries returned contain mouse, but entries that contain both keyboard and mouse have a higher score than those entries that contain only mouse.

To optimize memory during searching, AR System server truncates the search terms whenever the count of special characters exceeds 10. 
For example, AR System servertruncates the search term @# @# @# @# @# apples @# bananas to @# @# @# @# @# apples.

Important

The following error is displayed for any mismatched value of parentheses in a search term:
Unable to complete the full text search operation. (ARERR 657)

Entering search criteria

The Filter tab enables you to limit the entries to be searched.

The fields on this tab as shown in the following image are:

  • (optional) Form List—Enter a list of form IDs for forms that you want to search. Separate the IDs with semicolons. If this field is blank, all FTS-indexed forms and fields, which the administrator does not specifically exclude and to which the user has permission are searched.
  • (optional) Search Filter—Enter an AND, OR, NOT qualifier that uses the configured category fields defined by Full Text MFS Category Name field property, as well as creates and modifies date fields.
    For example, you could supply the following search filter to limit the search:

    ('status' = "Draft" OR 'status' = "SME Review") AND 'ProductTier1' = "Hardware"

    22_1_MFS_filter_tab.png

In addition to using category fields, you can use the fields listed in the following table in a search filter qualification.


Fields for search filter queries

When you filter with dates, you can use the =, <, >, <=, >= operators, for example:

  • The following qualification limits entries to those created only on September 1, 2009:

    'createTime' = "1251784800"
  • The following qualification limits the entries to only those created since September 1, 2009 (open-ended):

    'createTime' >= "1251784800"
  • The following qualification limits the entries to those created only between and including the dates of September 1, 2009, and September 15, 2009:

    'modifiedTime' >= "1251784800" AND 'modifiedTime' <= "1252994400"
  • The following qualification limits the entries to those created only between and excluding the dates of September 1, 2009, and September 15, 2009:

    'modifiedTime' > "1251784800" AND 'modifiedTime' < "1252994400"

Entering search results data

On the Result Data tab, you design how the result data is returned to the user. You can design how the result data is returned in the search results and define columns relevant to that data in a result list.

To configure the result data format, select one of the following options from Search Result Option:

  • (Default)No Excerpt/WAH —Returns results based only on the text that was searched for. It does not return an excerpt or the words surrounding the result. This is the most efficient option.
  • Excerpt—Returns the first thirty words of the resulting hit so that the user can read a summary of the content. This option is less efficient than No Excerpt/WAH but more efficient than Words Around Hit.
  • Words Around Hit (WAH)—Returns excerpts that contain the text from the search as well as surrounding text. The text that was searched for is surrounded by brackets ([]).
    For example, if printer was searched for, a result might be setting up the [printer] in room 1B.
  • Count Only—Returns the potential number of matches for the search. The count is taken before row-level permissions are applied, which may reduce the actual result set.

The following fields are returned with every search request:

  • Form
  • Entry ID
  • Title
  • Excerpt or Words Around Hit (if requested)
  • Weight (relevancy score)
  • Create Date
  • Modify Date

The Optional Return Fields area on the Result Data tab enables you to map a defined category field to one of the result fields. You can configure up to 20 result fields.
22_1_MFS_results_tab.png

If the name of a category field is supplied in any result field at the time of the search, then that result field is populated with the values from that category field.
For example, if you enter the following qualification, the values from the status filter field are returned in Result 1:

'Result 1' = "status"

To define a category field, enter a category name in the Full Text MFS Category Name field property for the field. For more information, see Defining-a-field-for-FTS.

Searching when exact matches for MFS are enabled

As an administrator, you can enable the configuration setting to support exact matches for MFS for quoted strings even if the quoted strings contain ignore words.

Example

Consider a scenario where you search for the phrase out of memory. The search results containing the phrases Lost my memory the other day, That was a bad memory, and My computer is out of memory are returned. This is because out and of are defined in the Ignore Words List. So, these ignore words are considered as placeholders and search results that are similar to the searched phrase are returned instead of an exact match. However, after you enable the Support Exact Matches for Phrases setting, only the search result with the phrase
My computer is out of memory is returned.

To enable the Support Exact Matches for Phrases setting, see Enabling-exact-matches-for-full-text-searches.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*