Open topic with navigation

# Use a Custom Term Weight File

A custom term weight file defines a set of terms and weights to use when HPE IDOL Server calculates relevance weighting at query time. HPE IDOL Server calculates term weights at index time, and stores a list of term weights for the index. You can retrieve the term details by using the `TermGetInfo` action.

In a distributed system, you might want to use a custom term weight file to ensure that all your child servers have the same term weighting, to ensure consistent results and relevant weighting across your indexes.

When the custom file exists, HPE IDOL Server uses it for all queries unless you set the `CustomWeight` action parameter to `False` for an action. This action parameter is available for the `Query`, `Suggest`, `SuggestOnText`, `GetQueryTagValues`, `Summarize`, `TermGetBest`, and `TermGetInfo` actions.

You can use the `DREMODIFYTERMWEIGHT` index action to add, modify, or delete a custom term weight file.

    http://IDOLhost:indexPort/DREMODIFYTERMWEIGHT?Filename=CustomWeightFile

where:

`IDOLhost` | is the IP address or host name of the HPE IDOL Server.
`indexPort` | is the HPE IDOL Server index port (specified as `IndexPort` in the `[Server]` section of the HPE IDOL Server configuration file).
`CustomWeightFile` | is the file name and path to the XML file that contains the stemmed terms and custom weight values to use. You can use the output from the `TermGetInfo` action, or an XML file with the same structure. HPE IDOL Server extracts the term from the value of each `<autn:term>` tag, and the weight from the value of the `apcm_weight` attribute in the tag. For example:
    <autn:term apcm_weight="nn">TERM</autn:term>
HPE IDOL Server applies weight `nn` to `TERM` (`TERM` must be stemmed).

For example:

    http://localhost:9001/DREMODIFYTERMWEIGHT?Filename=C:\IDOL\Files\CustomWeight.xml

By default, if you have an existing custom term weight file,HPE IDOL Server updates the file with the values in the new one. HPE IDOL Server adds any terms that do not exist in the current file, and updates the weight for any terms that do exist. You can set the `KeepExisting` parameter to `False` to delete the existing file and replace it with the new one.

You can also set `KeepExisting` to `False` without setting the `Filename` parameter. In this case, HPE IDOL Server deletes the custom term weight file and uses the default index weights. For example:

    http://localhost:9001/DREMODIFYTERMWEIGHT?KeepExisting=False

For more information about the `DREMODIFYTERMWEIGHT` index action, refer to the HPE IDOL Server Reference.

Related Topics

- Display Online Help

© 2016 Hewlett Packard Enterprise Development LP | Send documentation feedback to HPE Close Send Documentation Feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to AutonomyTPFeedback@hpe.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_HP_HTML5_bannerTitle.htm