Search Behavior and Commands for KMC and for the Sphinx API

This article is relevant for the KMC search or when using the Kaltura API with Sphinx.


The following special operators can be used in a free text search field in the Kaltura API:

  • Exclamation mark (!) - AND NOT . Note that AND NOT is not a unary NOT operator. A positive search word must appear before the AND phrase. See here for additional information.
  • Double Quotes ("") - are treated as an EXACT MATCH search operand.
  • Backslash (\) - escape. To search for the character ! you have to enter ! in the search field.
  • Comma (,) - OR
  • Spacebar - AND

Blend Chars

Blended characters are indexed both as separators and valid characters. For instance, assume that & is configured as blended and AT&T occurs in an indexed document. Three different keywords will get indexed, namely "at&t", treating blended characters as valid, plus "at" and "t", treating them as separators.

The following blend chars are configured for the API search.

!, $, ', (, ), *, -, /, :, ;, <, =, #, [, , ], ^, `, {, |, }, ~, %, &, +, >, ?, @, _

These blend characters may be used as delimiters or as characters.

NOT operator

To perform a NOT operator, it is possible to use Sphinx's '!' operator – the meaning of the ! operator is AND NOT.
Search for NOT alone is not possible, every NOT search must first begin with a positive search query.
For example, setting the freeText field to: "food !pizza" ---- will return all entries that contain the word 'food' AND do NOT contain the word 'pizza'.
NOTE: Searching for "!pizza" alone will return an ERROR.

This operator as well as quotes (") for exact match, work on all filter text fields in the API.

Exact Match

To search for an exact match, wrap the search query with quotes, for example: 'money ball' will return all entries that contain the string 'money ball' but not entries where money and ball were separated by other characters.

In This Article
Was this article helpful?
Thank you for your feedback!