SearchBlox

SearchBlox Developer Hub

Welcome to the SearchBlox developer hub. Here you will find comprehensive guides and 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!

Documentation

Searching

How to Search

Regular, as well as faceted, searches can be performed on the indexed files in SearchBlox. For more details, click on the following links:
Regular Search
Faceted Search
Some of the basics of syntax and language support in SearchBlox are given below.

Query Syntax

SearchBlox supports a wide range of searching options.
By default on giving more than one search term OR operator is used. The user can explicitly change it to AND by using &default as search parameter in search URL. Please refer Search Parameters to get to know more about the same.

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:
te?t
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.
te*t

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:
roam~
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

Exact Search or Phrase Search

If a phrase has to be searched in SearchBlox, then the phrase has to be enclosed within double quotes
“This is a phrase search"

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).

OR
The OR operator is the default conjunction operator. 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 exist in a document. This is equivalent to union using sets. The symbol || can be used in place of the word OR. To search for documents that contain either “searchblox server” or just “searchblox” use the query:
“searchblox server” OR searchblox
Giving the following query yields the same as the one given above with OR operator:
searchblox j2ee

AND
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. The symbol && can be used in place of the word AND. To search for documents that contain “searchblox” and “j2ee” use the query:
searchblox AND j2ee

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 query:
+searchblox j2ee

NOT
The NOT operator excludes documents that contain the term after NOT. This is equivalent to a difference using sets. The ! symbol can be used in place of the word NOT. To search for documents that contain “searchblox server” but not “j2ee” use the query:
“searchblox server” NOT j2ee

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

Important note for Boolean Search - Case Sensitivity

In order to make Boolean search work please enable Case Sensitive search to yes in Search Settings.

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 query:
“searchblox server” -”j2ee”

Fielded Searches
SearchBlox supports fielded search. When performing a search, you can either specify a field, or use the default field. The field names and default field are fixed and cannot be changed. You can search any field by typing the field name followed by a colon “:”, and then the term you are looking for.
Examples:
keywords:news
title:world
url:"http://www.bbc.com"

Below is the list of fields available in SearchBlox:

Fields
Default
Description
Example

content

Yes

Document content

content:test

keywords

Yes

Document keywords

keywords:news

title

Yes

Document description

description:world

description

Yes

Document title

title:"world news"

url

No

Document URL

contenttype

No

Document format

contenttype:pdf
contenttype:word

language

No

ar – Arabic de – German ko – Korean sk – Slovak
bn – Bengali el – Greek lv – Latvian sl – Slovenian
cs – Czech gu – Gujarati lt – Lithuanian es – Spanish
da – Danish iw – Hebrew mal – Malayalam sv – Swedish
nl – Dutch hi – Hindi no – Norwegian ta – Tamil
en – English hu – Hungarian pl – Polish te – Telugu
es – Estonian it – Italian pt – Portuguese th – Thai
fi – Finnish ja – Japanese ru – Russian tr – Turkish
fr – French kn – Kannada ro – Romanian
zhcn - Chinese

language:en

Grouping
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 “j2ee”, 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.
We can also group fielded search with boolean operators to form complex queries like below:
+travel +world +(title:news)
(world AND travel) OR (keywords:news AND title:world)

Searching