What is the query syntax for SearchBlox?

Here is a sample of search options through SearchBlox. For more details on the basics of SearchBlox's syntax and language support, refer to the wiki page here: https://searchblox.atlassian.net/wiki/display/SD/Searching

Wildcard Searches

SearchBlox supports single- and multiple-character wildcard searches. To perform a single character wildcard search, use the “?” symbol. To perform a multiple character wildcard search, use the “*” symbol.

The single character wildcard search looks for terms that match with the single character replaced. For example, to search for “text” or “test” you can use the search:


Multiple character wildcard searches looks for 0 or more characters. For example, to search for test, tests or tester, you can use the search:


You can also use the wildcard searches in the middle of a term.


Spelling Suggestions

By enabling Spelling Suggestion in collection settings, spelling suggestions will appear below the search box in both regular and faceted search.


By enabling stemming, inflected words are reduced to root form. Inflection refers to words taking different forms to express differences in tense, numbers, gender, etc. Most languages are inflected in this way. “Running”, “runs”, and “ran” are the inflected forms of “run”.

When stemming is enabled, searching for the word "wonder", documents with "wonders", "wondering", "wondered", "wonderful", etc., will be returned as results (refer to the screenshot below). If a root word is searched, documents with inflected words and root words will be returned. Similarly, searching for inflected words (eg: wondering) will list documents with root and inflected words in the results.  

When stemming is disabled, only the words searched, and not the inflected forms, will appear in the results.

Note: Stemming can be enabled or disabled in SearchBlox’s collection settings. After saving the changes made, the collection needs to cleared and indexed for it to take effect.

Fuzzy Searches

SearchBlox supports fuzzy searches. To perform 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 “roam”, use the fuzzy search:


This search will find terms like "foam" and "roams".

Proximity Searches

SearchBlox supports finding words that are a within a specific distance. To do a proximity search, use the tilde (~) symbol at the end of a phrase. For example, to search for “searchblox” and “j2ee” within 10 words of each other in a document use the search:

“searchblox j2ee”~10

Boolean Operators

Boolean operators allow terms to be combined through logic operators. Lucene supports AND, “+”, OR, NOT and “-” as Boolean operators (Note: Boolean operators must be ALL CAPS).


SearchBlox supports using parentheses to group clauses to form sub-queries. This is useful for users who want to control the Boolean logic for a query.To search for either “searchblox” or “server”, and “jee”, use the query:

(searchblox OR server) AND j2ee

This eliminates any confusion, and makes sure that the website exists and either term "searchblox" or "server" exists.

Escaping Special Characters

SearchBlox supports escaping special characters that are part of the query syntax. The current list of special characters includes + - & || ! ( ) { } [ ] ^ “ ~ * ? : \. To escape these characters, use the \ before the character. For example, to search for (1+1):2 use the query:


Have more questions? Submit a request