Query language help
- Simple query
- Phrase operator
- Metadata search
- Dysjunction (OR) operator
- Negation operator
- Mandatory exclusion operator
- Mandatory inclusion operator
- Scoped mandatory inclusion operator (scoped AND)
- Scoped mandatory inclusion with dysjunction operator (OR with scoped AND)
- Near (proximity) operator
- Up-weight operator
- Date query
- Truncation operator
- Complex examples
- See also
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.
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.
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.
Answers to this query will contain the exact phrase "hail caesar". No partial matches will occur.
The phrase operator is equivalent to the
query_phrase CGI parameter. e.g.
Documents may contain metadata, including the document’s author, title and when it was created. Funnelback can query this information using the syntax:
where class is the metadata class as defined in the collection’s metadata mappings.
locates documents containing the word barcelona within the metadata field corresponding to the metadata class "city".
The metadata operator is equivalent to the
meta_X CGI parameter. e.g.
See: searching text metadata for more information.
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.
The dysjunction operator is equivalent to the
query_or CGI parameter e.g.
The negation operator excludes all documents that contain the negated query from the fully matching results.
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.
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.
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.
The mandatory exclusion operator is equivalent to the
query_not CGI parameter. e.g.
The mandatory inclusion operator will return results that all have the included terms.
A full answer to this query will include the words antony and cleopatra. Every result will contain the word cleopatra.
The mandatory inclusion operator is equivalent to the
query_and CGI parameter. e.g.
Scoped operators cause the index to be scoped and don’t count as query parameters. The scoping reduces the index to include only documents containing the scoped items, then the rest of the query is run on the scoped index. This means that the scoped operators don’t count towards partial matches and that other query parameters are required for results to be returned as the scoping just defines the overall set of pages that can be included in a result set.
rome octavius |antony |cleopatra
A full answer to this query will include all four words rome. Every result will contain the word antony and cleopatra. A partial match with include antony and cleopatra, and either rome or octavius.
The scoped mandatory inclusion operator is equivalent to the
query_sand CGI parameter. e.g.
Similar to the scoped AND, this pre-scopes the index to include only items that match match a set of ORed terms.
rome octavius |[antony cleopatra]
A full answer to this query will include rome and octavius and one or both of antony and cleopatra. Every result will contain the word antony or cleopatra. A partial match with include antony and/or cleopatra, and either rome or octavius.
The scoped mandatory inclusion with dysjunction operator is equivalent to the
query_orsand CGI parameter. e.g.
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.
The full answer to this query will be those documents that include the word army within 15 words of march (in any order).
The near operator is equivalent to the
query_prox CGI parameter. e.g.
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.
A weighting can be set by appending the weight using a carat operator. For example:
computer science course ~concurrency^0.9
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).
This query returns documents that were modified/created before the 1st of January 1600.
Several date CGI parameters can be used to handle a date query. e.g.
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:
The truncation operator is supported in term at a time mode, only when either the
-daat=0query processor option is set.
Enabling term at a time mode disables many newer Funnelback features.
Truncation is an expensive operation and can significantly impact the search response time.
The knowledgebase article: Adding limited wildcard support to DAAT mode provides a method for adding limited truncation support to the newer document at a time mode.
The truncation operator matches pages containing words that contain variants of the query term matching the wildcard.
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.
This example pattern matches all pages with words containing the string och, such as antioch and rochester.
The truncation operator is equivalent to the
query_trunc CGI parameter. e.g.