- If a file is listed in the "Search results" tab, it does not imply that a preview will be available in the "Previews" tab, as looqs can search more file formats than it can generate previews for currently.
- Database paths are stored inefficiently, not deduplicated to simplify queries. This may add up quickly. Also, each PDF text is stored twice. Each page separately + the whole document to simplify queries.
At the time this section was written, 167874 files were in my index. A FTS index was built for 14280 of those, of which 4146 were PDF documents. The PDFs take around 10GB storage space on the filesystem. All files for which an FTS has been built are around 7GB in size on the filesystem. The looqs database has a size of 1.6 GB.
interface. The GUI has a menu entry to quickly open this config file. This is to be considered temporary and will be removed once the GUI itself can edit all settings.
It's most convenient if, when you click on a preview, the PDF reader opens the page you clicked. For that, looqs needs to know which viewer you want to launch.
The preview tab shows previews. It marks your search keywords too. Click on a preview to open the file.
A right click on a preview allows you to copy the file path, or to open the containing folder. Hovering tells you which file the preview originates from.
### Syncing index
Over time, files get deleted or their content changes. Go to 'looqs' -> 'Sync index'. looqs will reindex the content of files which have been changed.
Files that cannot be found anymore will be removed from the index.
Reindexing a path using the "Index" tab will index new files and update existing ones. Currently however, this does not deal with deleted files.
The most obvious way is to use the GUI and add your favorite paths in the "Index" tab. Then occasionally, just rescan. This works for me personally, looqs quickly picks up new files. This however may not be good enough for some users.
Some users may prefer setting up cronjobs or wire up the CLI interface with file system monitoring tools such as [adhocify](https://github.com/quitesimpleorg/adhocify).
### lh shell alias
If you are in a shell and you know your file is somewhere in your current directory or its subdirs, and those
are indexed by looqs, you may find the lh (look here) alias useful:
```
alias lh='looqs search $(pwd)'
```
So typing "lh recipes" searchs the current dir and its subdirs for a file containing 'recipes'.
## Query syntax / Search filters
A number of search filters are available.
The most important ones are:
- path.contains:(term), short: p:(term) - Pretty much a SQL LIKE '%term%' conditions, just searches the path string
- path.ends:(term), short: pe:(term) - Filters path ending with the specified term, e. g.: pe:(.ogg)
- path.begins:(term), short: pb:(term) - Filters path beginning with the specified term.
- contains:(terms), short: c:(terms) - Full-text search, also understands quotes.
Filters can be combined. The booleans AND and OR are supported. Negations can be applied too, except for c:().
The AND boolean is implicit and thus entering it strictly optional.
Examples:
pe:(.ogg) p:(marley) - Finds files that end with .ogg and contain 'marley'. May be a reasonable attempt to find songs by Bob Marley in your musics collection.
p:(slides) support vector machine - Performs a content search for 'support vector machine' in all paths containing 'slides'
p:(notes) (pe:(odt) OR pe:(docx)) - Finds files such as notes.docx, notes.odt but also any .docs and .odt when the path contains the string 'notes'.
memcpy !(pe:(.c) OR pe:(.cpp))- Performs a FTS search for 'memcpy' but excludes .cpp and .c files.
c:("I think, therefore") - Performs a FTS search for the phrase "I think, therefore".