Proxy Component 25.4
Proxy Component Help

# Use a Custom Term Weight File

A custom term weight file defines a set of terms and weights to use when the Content component calculates relevance weighting at query time. Content 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, Content 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://ContentHost:indexPort/DREMODIFYTERMWEIGHT?Filename=CustomWeightFile

where:

`ContentHost` | is the IP address or host name of the Content component.
`indexPort` | is the Content component index port (specified as `IndexPort` in the `[Server]` section of the Content component 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. Content 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>
Content applies weight `nn` to `TERM` (`TERM` must be stemmed).

For example:

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

By default, if you have an existing custom term weight file, Content updates the file with the values in the new one. Content 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, Content 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 Content component Reference.

Related Topics

- Display Online Help

Copyright 2025 Open Text
Version 25.4 | Last updated October 2025

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: Knowledge Discovery Proxy Component 25.4

Topic Title: Use a Custom Term Weight File