Both regular and faceted searches can be performed on indexed files in SearchBlox. For more details, click on the following links:
Some of the basics of syntax and language support in SearchBlox are given below.
SearchBlox supports a wide range of searching options.
By default, when more than one search term is given, OR operator is used. You can explicitly change it to AND by using &default as the search parameter in the search URL. Refer to Search Parameters to learn more.
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.
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".
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:
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 allow terms to be combined through logic operators. Lucene supports AND, “+”, OR, NOT and “-” as Boolean operators (Note: Boolean operators must be ALL CAPS).
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. 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:
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 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:
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 query:
“searchblox server” NOT j2ee
The NOT operator cannot be used with just one term. For example, the following search will return no results:
NOT “searchblox server”
Boolean Search - Case Sensitivity
In order for Boolean search to work, 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”
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.
Below is the list of fields available in SearchBlox:
ar – 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. 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.
You 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)
Updated 6 months ago