Query Language used in Morovia Web Site Search

Morovia web search supports powerful query language. This page provides the basic guide to the syntax of the site search engine.

Query Syntax Error and Special Characters

The following several queries will return a syntax error:

  • A query containing no word(s), but only special characters or other none word characters.

  • A query contains word(s), but ends with a * character.

The current list of special characters is

+ - && || ! ( ) { } [ ] ^ " ~ * ? : \

You can use special charaters in wildcard and fuzzy searches. We DO NOT recommend you to search these special characters. To escape these character use the \ before the character.

Terms

A query is broken up into terms and operators. There are two types of terms: Single Terms and Phrases.

A Single Term is a single word such as qrcode or fonts.

A Phraseis a group of words surrounded by double quotes such as "PDF417 Encoder".

Multiple terms can be combined together with Boolean operators to form a more complex query (see below).

Term Modifiers

It is possible to modify query terms to get a wide range of searching options.

Wildcard Searches

Single and multiple character wildcard search is supported within single terms (not within phrase queries). To perform a single character wildcard search use the "?" symbol. The single character wildcard search looks for terms that match that with the single character replaced. For example, to search for "text" or "test" you can use the search:

te?t

To perform a multiple character wildcard search use the "*" symbol. Multiple character wildcard searches looks for 0 or more characters. For example, to search for test, tests or tester, you can use the search:

test*

You can also use the wildcard searches in the middle of a term, such as:

qrc*de

Fuzzy Searches

To do a fuzzy search use the tilde, "~", symbol at the end of a Single word Term. For example to search for a term similar in spelling to "macro" use the fuzzy search:

macro~

This search will except the term "macro" find terms like "macros" and "micro".

Proximity Searches

You can also find words that are within a specific distance away. To do a proximity search use the tilde, "~", symbol at the end of a Phrase. For example to search for a "pdf417" and "application" within 5 words of each other in a document use the search:

"pdf417 application"~5

Boosting a Term

To boost a relevance of a term use the caret, "^", symbol with a boost factor (a number) at the end of the term you are searching. The higher the boost factor, the more relevant the term will be.

Boosting allows you to control the relevance of a document by boosting its term. For example, if you are searching for

pdf417 encoder

and you want the term "encoder" to be more relevant, boost it using the ^ symbol along with the boost factor next to the term. You would type:

pdf417 encoder^4

This will make documents with the term encoder a ppear more relevant. You can also boost Phrase Terms as in the example:

"qrcode encoder"^4 "common usage"

By default, the boost factor is 1.

Boolean Operators

Boolean operators allow terms to be combined through logic operators AND, "+", OR, NOT and "-" (must be ALL CAPS).

OR

The OR operator (or the symbol ||) links two terms and finds a matching document if either of the terms exist in a document.

To search for documents that contain either "qrcode encoder" or just "qrcode" use the query:

"qrcode encoder" qrcode

or

"qrcode encoder" OR qrcode

AND

The AND operator (or the symbol &&) matches documents where both terms exist anywhere in the text of a single document. To search for documents that contain "qrcode" and "fonts" use the query:

qrcode AND fonts

+

The "+" or required operator requires that the term after the "+" symbol exist somewhere in a the field of a single document. To search for documents that must contain "qrcode" and may contain "font" use the query:

+qrcode fonts

AND NOT

The AND NOT operator excludes documents that contain the term after AND NOT. This is equivalent to a difference using sets. The symbol "!" can be used in place of the word AND NOT.

To search for documents that contain "qrcode fonts" but not "fonts" use the query:

"qrcode fonts" AND NOT "fonts"

Note: The AND NOT operator cannot be used with just one term. For example, the following search will return no results:

AND NOT "fonts"

-

The "-" or prohibit operator excludes documents that contain the term after the "-" symbol. To search for documents that contain "qrcode" but not "fonts" use the query:

qrcode -fonts

Grouping

It is possible to use parentheses to group clauses to form sub queries. This can be very useful if you want to control the boolean logic for a query.

To search for either "run" or "compile" and "cecil" use the query:

(run OR compile) AND cecil

This eliminates any confusion and makes sure that "cecil" must exist and either term "run" or "compile" may exist.