User:Smalyshev (WMF)/Filedocs

File properties search
Since 1.28, CirrusSearch extension supports indexing and searching properties of files in  namespace, such as: Note that while these predicates are useful only for files, they by themselves do not limit search to File: namespace, so it is recommended to include this namespace into search or ever restrict the search to only this namespace when using these conditionals.
 * file media type
 * MIME type
 * size
 * width, height, resolution and bit depth for files that support these

filetype
Searching for file type allows to retrieve files according to their classification, such as office documents, videos, raster images, vector images, etc. The following types currently exist: " ", " ", " ", " ", " ", " ", " ", " ", " ", " ". This list may be extended in the future. See also MEDIATYPE_* constants in.

The syntax of the search is:. Example:

- looks for all videos

The type search is not case-sensitive.

filemime
Matches file MIME type. The syntax is:

- look for files of this MIME type

The argument can be quoted to specify exact match. Without quotes, partial matches to components of MIME type will be accepted too.

Examples:

- look for files with MIME type exactly

- look for all PDF documents

The MIME type search is not case sensitive

filesize
Search for file of given size, in kilobytes (kilobyte means 1024 bytes here). The syntax is:

or   - file with size at least given number

- file with size no more than given number

- file with size between given numbers

Examples:

or  - files 20Kb and bigger

- files smaller than 1Mb

- files with sizes between 100kb and 500kb

File measures
It is possible to search for specific file measures: width, height and resolution, which is defined as square root of product of height and width, and bit depth. Not all files may have these properties. The syntax is:

- file with measure that equals to given number

- file with measure that is at least given number

- file with measure that is no more than given number

- file with measure that is between given numbers

where measure can be:

or  - file widh

or  - file height

- file resolution (see above)

- file bit depth

Examples:

- files that are bigger than 800x600

- files with 16-bit color depth

- file between 100 and 500 pixels high