Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt
The query syntax can be used in Squirro to search items.

Table of Contents

Table of Contents
maxLevel2
outlinetrue
excludeTable of Contents

Introduction

Title and body fields are taken into account when searching.

By default the terms entered are or-combined with an additional clause that at least 1/3 of all terms must appear in a document to match. That means for a query with up to five terms, at least one must match and for a query between 6 and 8 terms, at least two terms must match and so on.

Boolean Operators

Use AND, OR, NOT, + (plus sign) or - (minus sign) to explicitly combine terms. Be aware that the operators need to be in all capital letters.

The following restrictions apply:

  • The + or required operator requires that the term after the + symbol exist somewhere.
  • The - or prohibit operator excludes documents that contain the term after the - symbol.

Example Queries

...

Grouping

Use brackets for grouping.

Example Queries

...

Phrase Search

Use double quotes at the beginning and ending of a phrase to perform a phrase search. Phrases must match exactly (i.e. no stemming is applied within a phrase). You can also add a slop to the phrase with a tilde ~ at the end of the phrase to do a proximity search.

Example Queries

...

Wildcard Search

Use * and ? to perform a wildcard search. Multiple character wildcard searches looks for 0 or more characters and the single character wildcard search looks for terms that match that with the single character replaced. Leading wildcards are allowed. Wildcard search can also apply per field.

Example Queries

...

1 Note that facet names containing spaces need to be put inside quotes in queries

Field Search

Only search in specific fields

...

$item_created_at >= "2015-02-01T00:00:00"

...

 

Facet Search

Use any document facet to restrict the search.

...

1 Note that facet names containing spaces need to be put inside quotes in queries

Sorting

You can use the following query syntax to sort the result:

sort:<field_name>[:<order>]

Where <field_name> is either 'date' (default) or 'relevance' or any item field name you want to sort by and <order> is either 'asc' for ascending or 'desc' for descending. The order suffix is optional, default order is descending.

Additionally you can add a second (or third etc) sorting criteria by adding

[;<2nd_sort_field[:<2nd_order]]

to the query syntax.

Time Increment

It is possible to control the time increments shown in the main timeline and in the dashboard widgets. To do so, add time_increment:<value> to a query.

Here is the Bugzilla Project without a time_increment set:

Image Removed

The same query, with time_increment:year

Image Removed

Possible values are:

Code Block
languagetext
time_increment:minute
time_increment:hour
time_increment:day
time_increment:week
time_increment:month
time_increment:quarter
time_increment:year

This can also be combined with values for more flexibility. For example:

Code Block
languagetext
time_increment:12hours
time_increment:4days
time_increment:8weeks
time_increment:6months
time_increment:3year

...

This page can now be found at Query Syntax on the Squirro Docs site.