Special field-like specifiers

The field syntax also supports a few field-like, but special, criteria, for which the values are interpreted differently. Regular processing does not apply (for example the slash- or comma- separated lists don't work). A list follows.

  • dir for filtering the results on file location. For example, dir:/home/me/somedir will restrict the search to results found anywhere under the /home/me/somedir directory (including subdirectories).

    Tilde expansion will be performed as usual. Wildcards will be expanded, but please have a look at an important limitation of wildcards in path filters.

    You can also use relative paths. For example, dir:share/doc would match either /usr/share/doc or /usr/local/share/doc.

    -dir will find results not in the specified location.

    Several dir clauses can be specified, both positive and negative. For example the following makes sense:

    dir:recoll dir:src -dir:utils -dir:common

    This would select results which have both recoll and src in the path (in any order), and which have not either utils or common.

    You can also use OR conjunctions with dir: clauses.

    On Unix-like systems, a special aspect of dir clauses is that the values in the index are not transcoded to UTF-8, and never lower-cased or unaccented, but stored as binary. This means that you need to enter the values in the exact lower or upper case, and that searches for names with diacritics may sometimes be impossible because of character set conversion issues. Non-ASCII UNIX file paths are an unending source of trouble and are best avoided.

    You need to use double-quotes around the path value if it contains space characters.

    The shortcut syntax to define OR or AND lists within fields with commas or slash characters is not available.

  • size for filtering the results on file size. Example: size<10000. You can use <, > or = as operators. You can specify a range like the following: size>100 size<1000. The usual k/K, m/M, g/G, t/T can be used as (decimal) multipliers. Ex: size>1k to search for files bigger than 1000 bytes.

  • date for searching or filtering on dates. The syntax for the argument is based on the ISO8601 standard for dates and time intervals. Only dates are supported, no times. The general syntax is 2 elements separated by a / character. Each element can be a date or a period of time. Periods are specified as PnYnMnD. The n numbers are the respective numbers of years, months or days, any of which may be missing. Dates are specified as YYYY-MM-DD. The days and months parts may be missing. If the / is present but an element is missing, the missing element is interpreted as the lowest or highest date in the index. Examples:

    • 2001-03-01/2002-05-01 the basic syntax for an interval of dates.

    • 2001-03-01/P1Y2M the same specified with a period.

    • 2001/ from the beginning of 2001 to the latest date in the index.

    • 2001 the whole year of 2001

    • P2D/ means 2 days ago up to now if there are no documents with dates in the future.

    • /2003 all documents from 2003 or older.

    Periods can also be specified with small letters (e.g.: p2y).

  • mime or format for specifying the MIME type. These clauses are processed apart from the normal Boolean logic of the search: multiple values will be OR'ed (instead of the normal AND). You can specify types to be excluded, with the usual -, and use wildcards. Example: mime:text/* -mime:text/plain. Specifying an explicit boolean operator before a mime specification is not supported and will produce strange results.

  • type or rclcat for specifying the category (as in text/media/presentation/etc.). The classification of MIME types in categories is defined in the Recoll configuration (mimeconf), and can be modified or extended. The default category names are those which permit filtering results in the main GUI screen. Categories are OR'ed like MIME types above, and can be negated with -.

  • issub for specifying that only standalone (issub:0) or only embedded (issub:1) documents should be returned as results.

Note

mime, rclcat, size, issub and date criteria always affect the whole query (they are applied as a final filter), even if set with other terms inside a parenthese.

Note

mime (or the equivalent rclcat) is the only field with an OR default. You do need to use OR with ext terms for example.