Help > Web Development > Customizing Websites > Search Pages

Search Pages

Perceptive Enterprise Search is renowned for its ease-of-use and query power.

Perceptive Enterprise Search provides the same ease-of-use, the same power and the same query methods all via standard HTML pages. On installation Perceptive Enterprise Search creates sample HTML pages in the [Perceptive Enterprise Search]\WebSites\Default\WebRoot directory. You can freely customize your query forms.

Basics

You can use any text or HTML editor to edit the HTML forms used for Perceptive Enterprise Search queries.

To submit a search request to Perceptive Enterprise Search, first compose an HTML form with form elements containing special attributes. The input is posted to the Perceptive Enterprise Search Server when the user clicks a submit button. For example:

<html>
<head>
    <title>Command Query</title>
</head>
<body>
    <form method="post">
        Enter your Perceptive Enterprise Search query command:
        <input type="text" size="50" name="IW_FIELD_TEXT">
        <input type="submit" name="IW_FIELD_OK">
    </form>
</body>
<html>

The text input IW_FIELD_TEXT name attribute defines a command-based query. To execute a Plain English Query, use the name IW_FIELD_ENGLISH or IW_FIELD_NATURAL_LANGUAGE.

The submit input field name must be IW_FIELD_OK. For the submit button you can use an input tag with a type of "submit" or a type of "image".

The query text can be acquired from a variety of form controls as long as the field name is correct. In the example below the user chooses the query from a drop-down combo box and clicks an image to make it run.

<html>
<head>
    <title>Command Query</title>
</head>
<body>
    <form action="" method="post">
        Search for:
        <select name="IW_FIELD_TEXT">
            <option value="BOAT~ OR YACHT~ MARINE~">Boat stuff</option>
            <option value="PC OR COMPUTER">Computer stuff</option>
            <option value="MONEY NOT MONET">Finance stuff</option>
        </select>
        <input type="image" name="IW_FIELD_OK" src="ok.gif" alt="OK">
    </form>
</body>
</html>

In the <form> tag the method must be "post". You can leave the action field blank if this form is intended to be served by Perceptive Enterprise Search.

If this form is intended to be served by a third party server the form action attribute value is the IP address or host name of your Perceptive Enterprise Search Server. If you are running multiple Perceptive Enterprise Search Servers set the action field to direct the post to the appropriate server.

Note: If Perceptive Enterprise Search is running on a port other than 80 you must append the port number to the end of the IP address.

The standard sample HTML forms provide examples of the various query fields.

The following sections describe how the fields work in detail. In the following section a form element with a special name attribute is referred to as a field of that name. For example, an input field with attribute name=IW_FIELD_OK is referred to as an IW_FIELD_OK field.

Search Fields

IW_FIELD_OK

Sending an IW_FIELD_OK field causes Perceptive Enterprise Search to process the query on the page, if one is present. The field may be of type "SUBMIT" (a button), or of type "IMAGE".

IW_FIELD_TEXT

The value of the IW_FIELD_TEXT field is processed as a query command. The Perceptive Enterprise Search query command syntax is rich and powerful. Consult your Perceptive Enterprise Search Query Online Help for full details on the search syntax. Every search facility available in the standard version of Perceptive Enterprise Search is also available through the web server.

IW_FIELD_NATURAL_LANGUAGE

The value of the IW_FIELD_NATURAL_LANGUAGE field is processed as a Natural Language Query. For more information on Natural Language Queries, consult Perceptive Enterprise Search Query Online Help.

IW_FIELD_ENGLISH

Same as IW_FIELD_NATURAL_LANGUAGE.

IW_FIELD_WEB_STYLE

The value of the IW_FIELD_WEB_STYLE is processed as a web style query. See Web Style Query for details.

IW_BATCHSIZE

When Perceptive Enterprise Search processes a query it sends the results back in list form to the user's browser. The administrator may set a limit on how large a query result can be built. (See Max Result Size). Perceptive Enterprise Search also allows the result list to be packaged into smaller batches for speed and bandwidth economy.

The IW_BATCHSIZE field specifies how many found documents should be listed per results page. When the user has finished viewing the batch, clicking on a button gets the next batch. Batches are handled in the results page using the symbols {BATCHFIRST}, {BATCHLAST}, {NEXTBATCH}, {NEXTBATCHTEXT}, {PREVBATCH} and {PREVBATCHTEXT}. For an example of their use view the results template by visiting [WebSite]\WebTemplates\isys_result_template.html.

You may choose to place an invisible IW_BATCHSIZE field on the query form in which case the batch size will be imposed with no user knowledge or input. For example:

<input name="IW_BATCHSIZE" value="20"
                            type="hidden">

Alternatively, you may create a drop-down combo-box allowing the user to select one of a series of nominated values:

Results per page:
<select name="IW_BATCHSIZE">
    <option value="10">10</option>
    <option value="50">50</option>
    <option value="100">100</option>
</select>

Or, you may just provide an input box:

<input name="IW_BATCHSIZE" type="Text"
                        size="10" value="50">
IW_SORT

By default Perceptive Enterprise Search displays search results in order of relevance for Plain English queries and in "natural index order" (typically chronological) for command or menu-assisted queries.

The default sort sequence is usually appropriate and is most efficient. You can override the default sort sequence by using the IW_SORT field.

As in the above examples the field may be placed invisibly on the form or presented to the user in a select tag or other input type. The following values are recognized:

DEFAULT Sort by the order that documents appear in the index.
HITS Sort by the number of hits in the document.
DOCSIZE Sort by the size of the document.
FILEPATH Sort by the path of the document.
FILETYPE Sort by the type of document.
FILENAME Sort by the document file name.
DATETIME Sort by the document file date.
RELEVANCE Sort by the relevancy rating of the document.
RELEVANCE2 Sort by the relevancy rating of the document, taking into account the category weights.
DOCDATE Sort by the first date in the document.
BYTES Sort by the size of the document in bytes.
INDEXED Sort by the date the document was indexed.
TITLE Sort by the title of the document.
UNPHRASEDHITS Sort by the number of hits, unphrased.
FORMAT Sort by the format of the document.
CATEGORY Sort by the category of the document.

To sort results in reverse order to the default insert a minus symbol (-) in front of the relevant value. For example, using "HITS" will sort results with the most number of hits first, but "-HITS" will sort results with the least number of hits first.

You can also sort by any metadata field by using the name of the field. For example, use "AUTHOR" to sort by the values of the "Author" metadata field.
IW_INDEX or IW_DATABASE

If your Perceptive Enterprise Search Server uses only one index you do not need to use this field. When you have multiple indexes per server the IW_DATABASE field lets your query users switch between them. Note that indexes are nominated by their unique identifiers, chosen during configuration of the index in the web catalog in Utilities.

For example, to select from a drop-down combo box:

Search in index:
<select name="IW_DATABASE">
    <option value="MyIndex">
    My Demo Index
    <option value="CorpDB">
    Corporate Procedures
    <option value="Sport">
    Amazing Sporting Facts
</select>

Similarly, to select from a list of radio buttons:

Search in index:
<input type="radio" name="IW_DATABASE" value="MyIndex"> My Demo Index
<input type="radio" name="IW_DATABASE" value="CorpDB"> Corporate Procedures
<input type="radio" name="IW_DATABASE" value="Sport"> Amazing Sporting Facts

Or, to invisibly specify a particular index without any user option:

<input name="IW_DATABASE" value="MyIndex" type="hidden">
IW_SYNONYMS

This option enables you to override the search synonym behavior which is defined in a website's Search Defaults. Specify either "Yes" or "No".

IW_NOSYNONYM

(deprecated) The default synonym usage is defined in a website's Search Defaults. In previous versions of Perceptive Enterprise Search the default was to always use synonyms unless this option was present.

Further information about Synonym rings can be found in Perceptive Enterprise Search Query Online Help.

No Synonyms: <input type="checkbox" name="IW_NOSYNONYM">

This tag attribute can be used in a check box or a hidden field.

This options has been deprecated as the default synonyms setting is now administrator configurable, where as setting is only for enabling the thesaurus. Use IW_SYNONYM

IW_THESAURUS

This option enables you to override the search thesaurus behavior which is defined in a website's Search Defaults. Specify either "Yes" or "No".

IW_USE_THESAURUS

(deprecated)IW_THESAURUS , use This field will allow the user to turn on the "WordNet" thesaurus included with Perceptive Enterprise Search.

<input type="checkbox" name="IW_USE_THESAURUS">

This tag attribute can be used in a check box or a hidden field.

This option has been deprecated as the default thesaurus setting is now administrator configurable.

IW_CONFLATION

This option enables you to override the default conflation behavior which is defined in a website's Search Defaults. Specify either "Broad", "Narrow" , "Plurals" or "Off".

IW_AUTOCONFLATE

(deprecated)IW_CONFLATE , use This field enables automatic word tense conflation which allows searches to find different tenses of a word. If a search is performed on the word "constructed", Perceptive Enterprise Search returns matches on "construct", "construction" and "constructing". This function has the same effect as using a tilde "~" at the end of each word in a query.

Stemming: <input type="checkbox" name="IW_AUTOCONFLATE">

This tag attribute can be used in a check box or a hidden field.

This options has been deprecated as the default conflation setting is now administrator configurable, where as this setting is only for enabling the conflation, not specifying the level.

IW_SOUNDSLIKE

Standard Perceptive Enterprise Search provides a word wheel (Word Lookup function) to assist users to locate an indexed word by typing the first few letters.

The IW_SOUNDSLIKE field provides the same functionality to Perceptive Enterprise Search.

<input type="submit" name="IW_SOUNDSLIKE" size="10" value="Sounds like">

This tag must be used in a document that contains a valid POST command. View the file at [DefaultWebSite]\webroot\isysadvmenu.html for an example. It is also important that the page conforms to iterative query building.

IW_STEM

This submit field returns a list of words that start with characters entered into the input box. One of these words may be chosen and placed into the query input. This provides the second function of the word wheel.

<input type="submit" name="IW_STEM" size="10" value="Starts with">

This tag must be used in a document that contains a valid POST command. View the file at [DefaultWebSite]\webroot\isysadvmenu.html for an example. It is also important that the page conforms to iterative query building.

IW_REQUERY

This field can be used to allow a user to refine their query. Submitting a form with a hidden field of this name causes Perceptive Enterprise Search to interpret the query as a 'Query Within", as discussed in a later section.

<input type="hidden" name="IW_REQUERY" value="{PREVIOUSQUERY}">
IW_META_BOOST

This field allows you to adjust the significance of meta data when ranking documents. Set it to a value between 0 and 10, the higher the number, the higher meta data is ranked.

IW_BESTBETS

This option enables you to override the default best bets behavior which is defined in a website's Search Defaults. Specify either "On" or "Off".

IW_BESTBETS_COUNT

This option enables you to override the default best bets count behavior which is defined in a website's Search Defaults. Specify a numeric value between 1 and 20.

IW_BESTBETS_THRESHOLD

This option enables you to override the default best bets threshold behavior which is defined in a website's Search Defaults. Specify a numeric value between 0 and 1.0 (default is 0.9).

IW_SEARCH_SCOPE

Specifies the scope of the search. The scope specifies what part of the document the search terms must exist in. Specify either "All", "Body" or "Meta".

IW_LANGUAGE_PACK

Indicates the language used for searching, this controls search options including stemming/conflation and synonyms. The value is specified as the ISO two digit language code. For example:
en - English
fr - French
de - German
es - Spanish