Query Language Help

Introduction

This document gives an overview of how to perform advanced searches in Funnelback using different query operators. It lists the available query types and gives a link to an example results page for each one.

Simple query

This is just a simple sequence of words - described in the simple search document.

julius caesar rome

A full answer to this query would show pages that contain the terms julius, caesar and rome. Partially-matching answers would only need to contain one of these terms.

Phrase operator

A phrase query can be specified by putting quote characters ("") around your query words. Using the phrase operator specifies that the component words must appear consecutively and in the order specified. Note that intervening punctuation, HTML tags etc will be ignored.

"hail caesar"

Answers to this query will contain the exact phrase "hail caesar". No partial matches will occur.

Documents may contain metadata, including the document's author, title and when it was created. Funnelback can query this information using the syntax:

class:query

where class is the metadata class class you want to query (these are a single letter defined by the Funnelback administrator; standard classes include "a" for author, "t" for title).

The query:

t:capitol

locates documents containing the word capitol within the metadata field corresponding to the metadata class "t" (i.e. the document's title.)

Dysjunction operator

The dysjunction operator acts like an OR in a Boolean language. The results will contain any document that has at least one of the query terms. For example:

[mighty brave] army

A full answer to this query will include the word army and one or more of mighty or brave.

Negation operator

The negation operator excludes all documents that contain the negated query from the fully matching results.

caesar !brutus

A full answer to this query will include the word caesar but no occurrence of the word brutus. Unlike the mandatory exclusion operator (see below), partial results presented in subsequent result tiers may contain the word brutus.

Mandatory exclusion operator

The mandatory exclusion operator excludes all documents that contain the negated query from all results. This is similar to the NOT operator in a Boolean language.

caesar -antony

A full answer to this query will include the word caesar but no occurrence of the word antony. Unlike the negation operator (see above), no results will contain the word antony in the indexable part of the text. The partial results are those which satisfy the mandatory constraint (no antony) but which do not contain caesar.

Mandatory inclusion operator

The mandatory inclusion operator will return results that all have the included terms.

antony +cleopatra

A full answer to this query will include the words antony and cleopatra. Every result will contain the word cleopatra.

Scoped mandatory inclusion operator

The scoped mandatory inclusion operator is almost identical to the mandatory inclusion operator. It will return results that all have the included terms. Additionally, the operator will not count as a constraint for the purpose of organising results into tiers.

antony |cleopatra

A full answer to this query will include the words antony and cleopatra. Every result will contain the word cleopatra.

Near (proximity) operator

The near operator (backquotes) requires that the query words appear, in any order, within 15 words of each other. The Funnelback administrator can adjust this limit to any number of words.

`army march`

The full answer to this query will be those documents that include the word army within 15 words of march (in any order).

Up-weight operator

The up-weight operator (tilde) will increase the score of documents that match the element without making this element a constraint. For example:

computer science course ~concurrency 

The full answer to this query will be those documents that include the words computer,science and course, however documents that have the term concurrency will be given higher scores.

Truncation operator

Please note - The truncation operator is supported only when the -service_volume=low query processor option is set

The truncation operator matches pages containing words that contain the query term.

anti*

This example pattern matches all pages containing words starting with anti, such as antium and antioch. Be careful, there are almost always more matching words than you expect, resulting in more matching pages.

The truncation operator can appear at the left, at the right or both, but NOT in the middle of the string.

*och*

This example pattern matches all pages with words containing the string och, such as antioch and rochester.

Date Query

Date queries constrain the result set to documents that were modified/created during a specified time period. For date querying purposes, Funnelback only records one date per document. It will look for the date modified, the date created and the HTTP server's last modified date (in that order).

d<1jan1600

This query returns documents that were modified/created before the 1st of January 1600.

Stemming

By default Funnelback stems words in both the query and in the index. However, if it is disabled in the query processor options, you also can specify stemming by appending a cross-hatch ('#') to each query word you wish to stem.

For example, the query:

 economic# policy#

will match:

  • economic policy
  • economics policy
  • economic policies

Complex examples

Mixed operators

The query:

t:`war* castle`

mixes the following operators:

  • metadata: search for document titles (t);
  • proximity: titles containing the query terms close to each other (in any order); and
  • truncation: words beginning with war

See also

top