CSFFilterContent

Use this component to apply provided filters to a content list in a Content Selection pipeline (CSP).

Intended use: Content Selection pipeline, Filter stage.

Values Read

The CSFFilterContent pipeline component reads the following values from the indicated dictionaries.

Key

Dictionary

Description

FilterRequire

Order

Optional. A Dictionary object specifying fields (as keys) and corresponding values that a content item must have in order to avoid having its score set to zero (0).

FilterExclude

Order

Optional. A Dictionary object specifying fields (as keys) and corresponding values that a content item must not possess in order to avoid having its score set to zero (0).

_content.*

Order

A key whose value is a reference to a ContentList object. The Filter method accesses various fields in the content items in the ContentList object in the course of filtering the content items.

Values Written

The CSFFilterContent pipeline component writes the following value to the Order dictionary.

Key

Description

_content.score

A key whose value is a reference to a ContentList object. The Filter method may set the score field of various content items in the ContentList object to zero (0), thus eliminating them from the selection process.

Remarks

The CSFFilterContent component applies filters to a content list in a Content Selection pipeline. The filters to apply are retrieved from FilterRequire and FilterExclude dictionaries in the Order dictionary.

This component uses the Filter method of the ContentList object. Content items may be eliminated from the selection process either by failing to meet a required condition or by meeting an exclusion condition. The Filter method is called once for each key in the dictionaries referenced by the FilterRequire and FilterExclude entries. The keys in these dictionaries should correspond to column names in the ContentList object; the values stored under the keys correspond to the values to be tested for.

Filtering is much faster than expression evaluation and it occurs at an earlier stage in Content Selection Framework (CSF) pipelines. The ContentList object builds indexes on any fields that are filtered. Because of this indexing, it is more efficient to do as much targeting as possible in the filter stage using the CSFFilterContent component. The list of content is contained in the ContentList object identified by the _content entry in the Order dictionary.

See Also

Other Resources

IContentList::Filter Method