Advanced filter operators

Easy and powerful filtering is essential to ContentKing, as it allows you to quickly search through even the biggest websites and create segments based on that.

When filtering on free input fields in ContentKing you can modify your query using advanced filter operators:

ContentKing advanced filter operators

Let's take a look at the different operators and see how using them would filter down the following example result set:

URL Title
/ <title>Some title describing the homepage</title>
/blog/ <title>This is our blog overview page</title>
/blog/contentking-is-awesome/ <title>Have you heard about next-gen auditing yet?</title>
/content/blog/example/ <title>Example blog article in the content sub-directory</title>
/empty-title/ <title></title>
/no-title/ Not defined

Contains

Result set must contain the entered value.

Example

When using this operator while filtering on the URL field with value /blog/ this is what the result set will look like:

Matches URL Title
no icon / <title>Some title describing the homepage</title>
yes icon /blog/ <title>This is our blog overview page</title>
yes icon /blog/contentking-is-awesome/ <title>Have you heard about next-gen auditing yet?</title>
yes icon /content/blog/example/ <title>Example blog article in the content sub-directory</title>
no icon /empty-title/ <title></title>
no icon /no-title/ Not defined

Not containing

Result set must not contain the entered value.

Example

When using this operator while filtering on the URL field with value /blog/ this is what the result set will look like:

Matches URL Title
yes icon / <title>Some title describing the homepage</title>
no icon /blog/ <title>This is our blog overview page</title>
no icon /blog/contentking-is-awesome/ <title>Have you heard about next-gen auditing yet?</title>
no icon /content/blog/example/ <title>Example blog article in the content sub-directory</title>
yes icon /empty-title/ <title></title>
yes icon /no-title/ Not defined

Starts with

Result set must start with the entered value (left-to-right matching).

Example

When using this operator while filtering on the URL field with value /blog/ this is what the result set will look like:

Matches URL Title
no icon / <title>Some title describing the homepage</title>
yes icon /blog/ <title>This is our blog overview page</title>
yes icon /blog/contentking-is-awesome/ <title>Have you heard about next-gen auditing yet?</title>
no icon /content/blog/example/ <title>Example blog article in the content sub-directory</title>
no icon /empty-title/ <title></title>
no icon /no-title/ Not defined

Ends with

Result set must end with the entered value (left-to-right matching).

Example

When using this operator while filtering on the URL field with value /blog/ this is what the result set will look like:

Matches URL Title
no icon / <title>Some title describing the homepage</title>
yes icon /blog/ <title>This is our blog overview page</title>
yes icon /content/blog/ <title>The blog folder within the content sub-directory</title>
no icon /blog/contentking-is-awesome/ <title>Have you heard about next-gen auditing yet?</title>
no icon /empty-title/ <title></title>
no icon /no-title/ Not defined

Exact match

The result set must exactly match the entered value, meaning that there can't be any characters before or after the entered value which the Contains operator would allow.

Example

When using this operator while filtering on the URL field with value /blog/ this is what the result set will look like:

Matches URL Title
no icon / <title>Some title describing the homepage</title>
yes icon /blog/ <title>This is our blog overview page</title>
no icon /blog/contentking-is-awesome/ <title>Have you heard about next-gen auditing yet?</title>
no icon /content/blog/example/ <title>Example blog article in the content sub-directory</title>
no icon /empty-title/ <title></title>
no icon /no-title/ Not defined

Present

The result set must contain results that have the element defined, including the results where the element is defined and has an empty value. For example: if a page has a page title element defined, this operator will include that page in the result set.

Note that this operator is only available for applicable fields. For example: the URL field can never have not found as a value (ie. the value is always present), and therefore this operator is not available for the URL field.

Example

When using this operator on the page title field this is what the result set will look like:

Matches URL Title
yes icon / <title>Some title describing the homepage</title>
yes icon /blog/ <title>This is our blog overview page</title>
yes icon /blog/contentking-is-awesome/ <title>Have you heard about next-gen auditing yet?</title>
yes icon /content/blog/example/ <title>Example blog article in the content sub-directory</title>
yes icon /empty-title/ <title></title>
no icon /no-title/ Not found

Not present

The result set must only contain results that don't have the element defined. For example: if a page doesn't have a page title element defined this operator will include that page in the result set.

Note that this operator is only available for applicable fields. For example: the URL field can never have not found as a value, and therefore this operator is not available for the URL field.

Example

When using this operator on the page title field this is what the result set will look like:

Matches URL Title
no icon / <title>Some title describing the homepage</title>
no icon /blog/ <title>This is our blog overview page</title>
no icon /blog/contentking-is-awesome/ <title>Have you heard about next-gen auditing yet?</title>
no icon /content/blog/example/ <title>Example blog article in the content sub-directory</title>
no icon /empty-title/ <title></title>
yes icon /no-title/ Not found

Present but empty

The result set must only contain results that have the element defined but with an empty value. For example: if a page has a page title element defined but without a value this operator will include that page in the result set.

Note that this operator is only available for applicable fields. For example: the URL field can never have an empty value and therefore this operator is not available for the URL field.

Example

When using this operator on the page title field this is what the result set will look like:

Matches URL Title
no icon / <title>Some title describing the homepage</title>
no icon /blog/ <title>This is our blog overview page</title>
no icon /blog/contentking-is-awesome/ <title>Have you heard about next-gen auditing yet?</title>
no icon /content/blog/example/ <title>Example blog article in the content sub-directory</title>
yes icon /empty-title/ <title></title>
no icon /no-title/ Not defined

Not present or empty

The result set must contain results that either don’t have the element defined at all or have the element defined but with an empty value.

Note that this operator is only available for applicable fields. For example: the URL field can never have the not found or empty value and therefore this operator is not available for the URL field.

Example

When using this operator on the page title field this is what the result set will look like:

Matches URL Title
no icon / <title>Some title describing the homepage</title>
no icon /blog/ <title>This is our blog overview page</title>
no icon /blog/contentking-is-awesome/ <title>Have you heard about next-gen auditing yet?</title>
no icon /content/blog/example/ <title>Example blog article in the content sub-directory</title>
yes icon /empty-title/ <title></title>
yes icon /no-title/ Not defined

Matching RegExp

The result set must match the entered regular expression. Our regular expressions are anchored. This means that it doesn't support adding your own anchors like ^ and $.

Regular expressions are a universal language that offers a very wide range of possibilities. Here are just a few examples of common use cases when filtering in ContentKing:

Expression Description
.* Matches any value
foo|bar Matches foo or bar
.*foo.*|.*bar.* Matches all strings that either contain foo or bar
.*foo.*|.*bar Matches all strings that either contain foo or end with bar
foo.*|.*bar Matches all strings that either start with foo or end with bar
.*\d+.* Matches all strings that contain a number
.*\d+ Matches all strings that end with a number
.*foo.*|.*\d+.* Matches all strings that either contain foo or a number

Not matching RegExp

The result set must not match the entered regular expression. This is the opposite of the Matching RegExp operator, which you can use to negate your expression.

For example, using .*foo.*|.*bar.* together with the Not matching RegExp operator will give you all strings that don’t contain foo and don’t contain bar.

Need help?

If you need a hand setting up the filters in ContentKing, don’t hesitate to contact us and we will be happy to help!