developer documentation r21358

Searching

If you are using API or one of the interfaces in the mediafactory to search for files, you are using Filemobile's search system. Because there have been a few questions around how searching works exactly, this document was created explaining the features and limitations.

Mediafactory uses a MySQL fulltext index to do searches on text, there are a couple of rules around what types of searches will work, and which won't. It should be noted that for most real-life searches conducted by your users, they will get the most appropriate results, but it is discouraged to use the search system for any type of organisation, including tagging based on category. The intention of the search system is to provide a fast, natural search for your end-users, not any type of strong categorization.

Search fields

The search system will look at the tags, filename, title and description of the file. The contents of any other field will be ignored.

Search query length

The fultext index only works on words longer than 4 characters. To make sure that shorter searches still work, we will search only on exact-match tags. For this reason the search will not find words shorter than 3 characters appearing in the title of a file.

Stop words

There is a list of common english stopwords, which the fulltext index completely ignores. An accurate list can be found in the MySQL documentation. If you do use one of the stopwords, your search will come back with no results.

Boolean search

All searches are conducted as 'boolean searches'. This means you can add for example + to a word to enforce a it to appear in every result, or - to make sure no items in the list contains that a word.

The full list of operators can also be found in the mysql documentation.

Exact matches

The fulltext search will only find exact matches for every word. This means you will not be able to find a file titled 'hockeystick', by searching on the word 'hockey'. It is possible to append an asterix (*) as a wildcard. This only works at the end of a word.

<< 3.6 Creating custom transcoder profiles 3.8 External storage & Content Delivery Networks >>