How to perform AND, OR, NOT and Exact Match Searches Using the Kaltura API with Shpinx

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

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