# Adjust Query Results

See Also: Result Relevance and Ranks

There are a number of settings that you can use to adjust the relative weighting of documents matched by queries to ensure that results are ordered appropriately.

## Make Some Fields More Important than Others

See Also: Field Weights

Field weighting is most commonly changed to give documents that contain query term matches in a title field a higher weighting than those that do not.

To configure certain fields to have a higher or lower weighting than other fields, use the `Weight` setting in the field properties section of the configuration file. By default all fields have a weighting of one. If you give a field a weighting of two, it means that IDOL gives a match of a term in that field a higher weighting than a match in a field with a weighting of one.

The weight given to the field saturates at a certain point depending on other settings, so Micro Focus recommends that you keep the value below 12. You can also use fractional values. For example, you might weight a field down to a weight of 0.2.

## Make Some Documents More Important than Others

See Also: AutnRank

Some documents are inherently more important than others.

You generally want to give the home page of a Web site more weight than a minor story elsewhere in the Web site.

You can specify the importance of a document by using the AutnRank functionality.

## Ensure Phrase Matches Have Higher Weight

See Also: Relevancy Calculation

Commonly you might want a search for `George Washington` to match a document about the president with a higher weighting than the text `George Smith lives in Washington`. You can achieve this behavior most easily by configuring AdvancedSearch, which uses `WNEAR` as the default query operator.

## Weight of Multiple Occurrences of Term Matches

See Also: Explicit Term Weights

The most common reason to change the occurrence weighting is to allow or prevent term counting from dominating the result weighting. For example, in some situations you might require documents with the most occurrences of a query term to appear top in the rankings, but not in other situations.

By default, IDOL relevance calculations balance the occurrence counting with other factors, so you should only change it in certain cases.

A document that matches multiple occurrences of a query term is weighted according to the field it occurs in. Increasing the field weight to four means that a match of a term in that field has a weight as if there were four occurrences of it in a field with a weight of one.

In addition, if the content field has a weight of one, and the title field has a weight of four, then a document containing a query term once in the title and three times in the content has a weight of seven.

In the same way as field weighting, the total weighting saturates at about 12, so if you want to count more occurrences, then you must reduce the field weight to differentiate more occurrences.

A field weight of 0.2 means that it can distinguish up to approximately 60 term occurrences.

Similarly, increasing a field weight to 20 means that a document has the same weight whether it matches a query term once or ten times.

## Make a Particular Document Match a Particular Query

In some situations there are common searches for which certain documents should return.

You might want a query for `lunch` to return the cafeteria menu even if the word `lunch` does not appear in the document.

There are a number of ways to achieve this behavior. The simplest method is to insert an additional Index field into some documents, in which you can add keywords to either force certain matches or to boost its relevance for particular queries. For example:

    #DREFIELD MyKeywords="breakfast lunch dinner"

In addition, you can control the level of the weighting by using multipliers. For example:

    #DREFIELD MyKeywords="breakfast[*1.2] lunch [*2] dinner [*1.5]"

This example gives a query for `lunch` is given twice its normal weighting when matching this document, so that this document probably appears at the top of the results list.

TIP: You can specify the exact position that a document returns in a results list for a given query by using Cardinal Placement in QMS.

_FT_HTML5_bannerTitle.htm