Skip to content

Latest commit

 

History

History
40 lines (22 loc) · 1.81 KB

queries.md

File metadata and controls

40 lines (22 loc) · 1.81 KB

Swamp queries

The search pane allows the user to use Bleve queries to find indexed repository files.

It's a superset of that language, adding a few extensions (called virtual fields).

Filtering by document type

Using the type: virtual field will search for files with a given document type, based on the file extension, not content.

  • type:video will list .mp4, .mkv, .avi, etc available in the repository.
  • type:audio will list .mp3, .ogg, .flac, .wav etc
  • type:image will list .png, .jpg, .gif, .tiff etc
  • type:document will list .doc, .odf, .rtf, .pdf etc

Filtering by file size

The size: field allows you to filter files by size (in bytes). It also accepts other file size units like MB, KB, GB, etc.

The >, >=, <, and <= operators are accepted, for example:

  • size:>= 10MB will list files equal or bigger than 10MB.
  • It can be combined with other filters. For example, size:>1GB ext:mp4 will list mp4 files bigger than 1GB.

Filtering by modification time

The modified: virtual field will allow you to find files that have been modified today, yesterday or recently (last 15 days). Modified is the mtime of the file when it was backed up, that is, the time when the file was last modified before it was backed up by restic.

For example:

modified:recently ext:mp4 will list all the mp4 video files that have been modified over the last 15 days.

modified:recently +size:>1Gb will list all the recently modified files bigger than 1GB.

Filtering by indexing time

The added: virtual field is similar to the modified: virtual field, but matches the time when the file was indexed. Currently supports today, yesterday, recently.