# Recoll user manual
Searching with the Qt graphical user interface

Sidebar | Prev | Up | Next

### The Query Fragments window

Selecting the Tools → Query Fragments menu entry will open a window with radio- and check-buttons which can be used to activate query language fragments for filtering the current query. This can be useful if you have frequent reusable selectors, for example, filtering on alternate directories, or searching just one category of files, not covered by the standard category selectors.

The contents of the window are entirely customizable, and defined by the contents of the `fragbuts.xml` file inside the configuration directory. The sample file distributed with Recoll (which you should be able to find under `/usr/share/recoll/examples/fragbuts.xml`), contains an example which filters the results from the WEB history.

Here follows an example:

    <?xml version="1.0" encoding="UTF-8"?>

    <fragbuts version="1.0">

      <radiobuttons>

        <fragbut>
          <label>Include Web Results</label>
          <frag></frag>
        </fragbut>

        <fragbut>
          <label>Exclude Web Results</label>
          <frag>-rclbes:BGL</frag>
        </fragbut>

        <fragbut>
          <label>Only Web Results</label>
          <frag>rclbes:BGL</frag>
        </fragbut>

      </radiobuttons>

      <buttons>

        <fragbut>
          <label>Year 2010</label>
          <frag>date:2010-01-01/2010-12-31</frag>
        </fragbut>

        <fragbut>
          <label>My Great Directory Only</label>
          <frag>dir:/my/great/directory</frag>
        </fragbut>

      </buttons>
    </fragbuts>

Each `radiobuttons` or `buttons` section defines a line of checkbuttons or radiobuttons inside the window. Any number of buttons can be selected, but the radiobuttons in a line are exclusive.

Each `fragbut` section defines the label for a button, and the Query Language fragment which will be added (as an AND filter) before performing the query if the button is active.

This feature is new in Recoll 1.20, and will probably be refined depending on user feedback.

Prev | Up | Next
| Home |