SearchBlox Developer Documentation

Welcome to the SearchBlox developer documentation. Here you will find comprehensive technical documentation to help you start working with SearchBlox as quickly as possible, as well as support if you get stuck. Let's jump right in!



Search is an integral part of SearchBlox. In SearchBlox you can perform a search as a faceted search, regular search, advanced search, or API based Search.
To learn more on different searches read:

Let us review basic search query syntax, standards, smart operators in search, and fielded searches supported in SearchBlox.

Search Query Syntax and Standards

  • SearchBlox query syntax is a combination of Elasticsearch query syntax and custom SearchBlox query syntax.
  • All alphanumeric characters, UTF-8 characters, special characters, and boolean operators can be used in the query term for search.
  • SearchBlox supports a wide range of smart operators to make search easy and customizable.

Wildcard Search

  • SearchBlox supports single- and multiple- wildcard character search.
  • 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.
  • To search for text or test you can use the search query:
  • Multiple character wildcard searches look for 0 or more characters.
  • To search for test, tests, or tester, you can use the search query:
  • You can also use a wildcard character in the middle of a term.

Fuzzy Search

  • SearchBlox supports fuzzy search. Fuzzy search can also be referred to as an approximate search and can fetch results even for incorrect spelling.
  • To perform a fuzzy search, use the tilde ~ symbol at the end of a single word term in the search query.
  • To search for a term similar in spelling to roam, use the fuzzy search query:
    This search will find terms like foam and roams.
  • If you want a fuzzy search for more than one term, fuzzy search operator has to be used separately for each term,
  • To perform a fuzzy search on International earth day, use the search query:
    international~ earth~ day

Proximity Search

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

Exact Search or Phrase Search

  • If a phrase has to be searched in SearchBlox, then the phrase has to be enclosed within double quotes
  • To search phrase Old is gold use the search query:
    “Old is gold"

Boolean Operators

  • Boolean operators allow search query terms to be combined through logic operators.
  • SearchBlox supports AND, +, OR, NOT and - as Boolean operators
  • Boolean operators AND, OR and NOT must be ALL CAPS.
  • For the Boolean search to work, enable Case Sensitive search to yes in Search Settings.

Case Sensitivity in Search Settings

OR Operator

  • The OR operator is the default conjunction operator in SearchBlox Search API.
  • This means that if there is no Boolean operator between two terms, the OR operator is used. The OR operator links two terms and finds a matching document if either of the terms exists in a document. * This is equivalent to a union using sets.
  • To search for documents that contain either searchblox server or just elasticsearch use the search query:
    “searchblox server” OR elasticsearch
  • Giving the following search query yields the same as the one given above with OR operator:
    searchblox j2ee

AND Operator

  • The AND operator matches documents where both terms exist anywhere in the text of a single document.
  • This is equivalent to an intersection using sets.
  • To search for documents that contain searchblox and j2ee use the search query:
    searchblox AND j2ee

NOT Operator

  • The NOT operator excludes documents that contain the term after NOT.
  • This is equivalent to a difference using sets.
  • To search for documents that contain “searchblox server” but not “j2ee”, use the search query:
    “searchblox server” NOT j2ee
  • The NOT operator cannot be used with just one term.
  • The following search will return no results:
    NOT “searchblox server”

Plus Operator "+"

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

Prohibit Operator "-"

  • The -, or prohibit operator, excludes documents that contain the term after the - symbol.
  • To search for documents that contain “searchblox server” but not j2ee use the search query:
    "searchblox server” -j2ee

Fielded Searches

  • SearchBlox supports fielded search where you can search a specific field.
  • By default when a search query is given, the search is made on content, description, title, and other custom fields that have been mapped to content.
  • This search can be made more specific using fielded search.
  • When performing a fielded search you need to give the field name followed by a colon :, and then the term you are looking for.
  • Examples:
  • When performing fielded search on url field, the url has to be enclosed in double-quotes.
  • You can perform fielded search on SearchBlox fields as well as custom fields.

Listing the SearchBlox fields that can be used for fielded search in the table:

contentYesDocument contentcontent:test
keywordsYesDocument keywordskeywords:news
titleYesDocument titletitle:"world news"
descriptionYesDocument descriptiondescription:world
urlNoDocument URLurl:""
contenttypeNoDocument formatcontenttype:pdf
languageNoar – Arabic
bn – Bengali
zhcn - Chinese
cs – Czech
da – Danish
nl – Dutch
en – English
es – Estonian
fi – Finnish
fr – French
de – German
el – Greek
gu – Gujarati
iw – Hebrew
hi – Hindi
hu – Hungarian
it – Italian
ja – Japanese
kn – Kannada
ko – Korean
lv – Latvian
lt – Lithuanian
mal – Malayalam
no – Norwegian
pl – Polish
pt – Portuguese
ro – Romanian
ru – Russian
sk – Slovak
sl – Slovenian
es – Spanish
sv – Swedish
ta – Tamil
te – Telugu
th – Thai
tr – Turkish


  • SearchBlox supports using parentheses to group clauses to form sub-queries.
  • Grouping is useful for users who want to control the Boolean logic for a query.
  • To search for either searchblox or server, and j2ee, use the query:
    (searchblox OR server) AND j2ee
  • You can also group fielded search with Boolean operators to form complex queries like:
    +travel +world +(title:"news")
    (world AND travel) OR keywords:news
    ((world AND travel) OR keywords:news) AND cnn

Default AND/OR operation

  • In Search API when more than one search term is used, the default conjunction operator used internally between the terms is OR.
  • We support a special parameter &default=AND which can change this internal conjunction operation to AND.
  • Due to popular demand, in faceted search we have provided &default=AND to make AND searches between multiple terms.
  • To learn more on this parameter read: Search Parameters

Operators in Search

Operator DescriptionOperatorExample
Wildcard Operator* - Asterisk Operator
? - Question Operator
Fuzzy Search Operator~ - Tilde Operatorroam~
Proximity~10 - Tilde with numeric Operators“searchblox j2ee”~10
Exact Search Operator"" - Double Quotes operator“Old is gold"
OR OperatorOR“searchblox server” OR elasticsearch
AND OperatorANDsearchblox AND j2ee
NOT OperatorNOT“searchblox server” NOT j2ee
Plus Operator+ - Plus Operator+searchblox j2ee
Prohibit Operator- -Minus Operator"searchblox server” -j2ee
Fielded Search Operator: -Colon Operatorkeywords:news
Escape Operator\test\~

Updated 13 days ago


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.