The weight content element attribute defines the relative importance of the content element, and if that content element can be searched. If the content element is output in the results, the weight is also used as importance for the clustering.

Positive values of the weight attribute add to the document's ranking score when a query is matched to the text within the content element. The maximum useful value for a weight attribute is 15.875.

Note: Any weight value higher than 15.875 will be stored, but considered equivalant to 15.875 when calculating the ranking score.

A weight of 0 means that the content element can be searched by a query, but any matches do not affect the overall ranking of the document.

A negative weight (refered to in this section as -1) prevents Watson™ Explorer Engine from indexing the content element, which means that it is not searchable. In most cases, we recommend that the indexed="false" attribute is used instead of weight="-1".

Note: Some converters only allow weight to be specified (e.g. those added by the Normalization Converter and Annotations). In these cases, you must use -1 if you do not want the content element to be indexed.

If you use the indexed="false" attribute, the content element cannot be searched by a query, but can be used in clusters, this is particularly useful when using static snippets. Using the weight="-1" attribute prevents any clustering of the content element text.

Note: If weight="-1" is specified for a content element, the indexed attribute is ignored. If both weight="-1" and action="index-only" are defined in a content element, the content is automatically discarded by the indexer.
Content weight is defined in the same way for all content element types, but its configuration is dependent on the type of content element being modified:
  • Crawled Content Elements

    To modify the weight of a crawled content element, create a custom converter to add weight="n" as an attribute of the content element, where n is the value of the weight. By default, most content elements are stored with a weight of 1. If you want a crawled content element to not be indexed, it is recommended that indexed="false" is used instead of weight="-1".

  • Normalized Content Elements

    Some content elements are processed by the Normalization Converter or other converters. These content elements include: URL, Host, Date Contents (last modified and/or crawled), and Attachment Filename. When deciding the weight for these content elements, the configuration must be made within the Normalization Converter. Edit the Normalization Converter and set the Weight field to the appropriate value. By default, URL, Host, and Attachment Filename are stored with a Weight of 1, and Date Contents are stored with a Weight of -1.

    Note: These content elements cannot utilize the indexed attribute.
  • Annotations

    Contents are not limited to those pulled into the index by a crawl. Other content elements include those produced by collaboration features such as Tags or Comments. Each of these content elements can also be manipulated by modifying the weight associated with it. Since these content elements are produced in a different way than crawled contents, they must also be managed using different mechanisms.

    Modifying the weight of a user-added content element is defined in the display for the associated annotation. Edit or create the annotation and set the Weight field to the appropriate value. By default, annotations are stored with a Weight of 1.

    Note: These content elements cannot utilize the indexed attribute.