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!

Guides

Search Parameters

Using Search Parameters

Search Request Parameters:

Parameter
Default Value
Range of Values
Description

query

Valid query syntax

Search query

fe

UTF-8

Valid web page encoding

Encoding of the search term

col

All Available Collections

Existing collection ID

Collection ID

page

1

Search Results page number

pagesize

10

1 to 1000

Number of results per page

xsl

default.xsl

Any XSL file placed in the /stylesheets directory

Name of the XSL file to use

cname

All available Collections

Any collection name

Name of collection

filter

Valid query syntax

Filter query

oc

all

all, title, description, content, URL

Occurance

cluster

false

true, false

Enabling clustering of results for clustered.xsl

startdate

YYYYMMDDHHMMSS
where
YYYY – is the year (eg: 2007)
MM – is the month (01 to 12)
DD – is the day (01 to 31)
HH – is hours (00 to 23)
MM – is minutes (00 to 59)
SS – is seconds (00 to 59)

Start date for date range search

enddate

YYYYMMDDHHMMSS
where
YYYY – is the year (eg: 2007)
MM – is the month (01 to 12)
DD – is the day (01 to 31)
HH – is hours (00 to 23)
MM – is minutes (00 to 59)
SS – is seconds (00 to 59)

End date for date range search

sort

relevance

relevance
date
alpha

Sort options for the search results
relevance – search result score
date – search result date
alpha – alphabetical sorting of search result title

sortdir

asc

asc or desc

Sort direction for search results – ascending or descending

mlt_id & mlt_col

mlt id is the object id, mlt col is the collection no

More like this results

downloadAsZip &zipSize

DownloadAsZip values are true or false,
zipSize is the no of files to be downloaded

To download files from file collection search results

default

OR

AND operator for default AND search
OR operator for default OR search

default field specifies the default boolean operator to be used in basic search with more than two search terms

group

Specific role allocated to the manager. This group parameter filters the results based on the role.

Advanced Search Request Parameters

Parameter
Default Value
Range of Values
Description

st

adv

adv

Search type

q_all

Valid query syntax

Search all the words

q_phr

Valid query syntax

Exact phrase

q_low

Valid query syntax

At least one word

q_not

Valid query syntax

Without the words

contenttype

pdf – Adobe Acrobat PDF (.pdf)
word – Word (.doc)
excel – Excel (.xls)
ppt – PowerPoint (.ppt)
rtf – Rich Text Format (.rtf)
txt – Text (.txt)
odf – OpenOffice
wp – WordPerfect
email – Emails from PST
attachment – Email attachments
Archives - zip, tar, tar.gz, tar.bz2

Document format

language

ar – Arabic
bn – Bengali
zhcn – Chinese (Simplified)
zhtw – Chinese (Traditional)
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
ru – Russian
ro – Romanian
sk – Slovak
sl – Slovenian
es – Spanish
sv – Swedish
ta – Tamil
te – Telugu
th – Thai
tr – Turkish

Document language

Faceted Search Request Parameters

Parameter
Default Value
Range of Values
Description

facet

on

on

Enable facets

facet.field

No default field

Any standard or custom field including term, number or date fields

Provides the ability to facet on any field

facet.field.filter

No default field

Possible values of the meta field to be filtered

The facet value of the meta field that is used to filter the results

facet.field.notfilter

No default field

Possible values of the meta field not to be filtered

The facet value of the meta field that is to be excluded in search results

f.{fieldname}.size

10

1-1000

Sets the number of values returned

f.{numericalFieldName}.range

No default field

Examples of range [TO100000], [1000TO100000], [100TO]

Sets of range of size for size field filtering

f.{numericalFieldName}.filter

No default field

Possible values of size ranges (as in range above) to be filtered

Possible size value to filter search results

f.{numericalFieldName}.range.notfilter

No default field

Possible values of size ranges (as in range above) not to be filtered

Possible size value to exclude in search results

f.{datefieldname}.range

No default field

Examples of date ranges [*TO2012-02-28T00:00:26], [2010-02-28T00:00:26TO2012-02-28T00:00:26]

Sets the range of dates for the date field filtering

f.{datefieldname}.interval

No default field

Possible values are minute, hour, day, week, month, quarter, year

Sets the date histogram period for date field faceting

f.{datefieldname}.filter

No default field

Possible values of date ranges (as in range above) to be filtered

Possible date values to be filtered

f.{datefieldname}.range.notfilter

No default field

Possible values of date ranges that is not to be filtered

Possible date values to be excluded

Search Response & Search Details

All information regarding the processed search query is encapsulated in the element tag. Below is the list of information available in the attributes of this element.

<?xml version=”1.0” encoding=”UTF-8” ?>
<searchdoc>
<results hits="16" time="0.00" query="news" suggest="mews" filter="" sort="relevance" sortdir="desc" start="1" end="10" currentpage="1" lastpage="2" startdate="0" enddate="0" xsl="xml">
+<result no=”1”>
+<result no=”2”>
+<result no=”3”>
+<result no=”4”>
+<result no=”5”>
+<links url="../servlet/SearchServlet?query=news&filter=&sort=relevance&sortdir=desc&col=3&col=1&col=4&col=2&startdate=0&enddate=0&xsl=xml&page=">
+<searchform url="../servlet/SearchServlet" query="news">
</searchdoc>
Attribute
Description

hits

Number of hits or matches for the query.

time

Time taken to return the results of the search query in seconds.

query

The search query.

suggest

Spelling suggestions, if available.

filter

Preset filter used for the query.

sort

Indicates how the search results are sorted. The possible values for this attribute are relevance, date and alpha.

sortdir

Indicates whether the search results are sorted in ascending or descending order. The possible values for this attribute are asc and desc.

start

The hit or match number of the first search result in this page.

end

The hit or match number of the last search result in this page.

currentpage

This indicates the current page number for this set of search results.

lastpage

This indicates the last possible page number for this set of search results.

startdate

Indicates the start date for the date range search.

enddate

Indicates the end date for the date range search.

pagesize

Number of search results per page.

messageid

Special field that would appear in JSON results for file collection alone on indexing mail files such as PST, eml and msg file. This message ID helps in connecting the mail attachment with its origin message. Both the message and attachment would have this messageid field so that both can be associated by the user.

Search Result Details

All information about each search result is contained in the element and its child elements.

Element / Attribute
Description

no

Number of hits or matches for the query.

url

Search result document URL.

lastmodified

Last modified date of document.

indexdate

Date the document was indexed.

creationdate

Date the document was created

title

Title of the document.

alpha

The text for the search result that is used for alphabetical sorting.

keywords

The keywords contained in the document.

contenttype

The format of the document.

context

This is the fragment of the content where the search query appears. This is available only when the documents have been indexed with the Keyword-In-Context feature enabled.

description

The description contained in the document.

language

Language setting for the document.

score

The relevance score for the document for this query.

highlight

Indicates terms that have been highlighted.

size

Document size in bytes.

Link Details

The element contains pre-canned page URLs to simplify the process of paginating through the search results. The page URLs available here include links to specific page numbers, the next and previous pages to the current page, and the URLs for the alternative sorting options.

 <links url="../servlet/SearchServlet?query=news&filter=&sort=relevance&sortdir=desc&col=3&col=1&col=4&col=2&startdate=0&enddate=0&xsl=xml&page=">
<link page="1" url="../servlet/SearchServlet?query=news&filter=&sort=relevance&sortdir=desc&col=3&col=1&col=4&col=2&startdate=0&enddate=0&xsl=xml&page=1"/>
<link page="2" url="../servlet/SearchServlet?query=news&filter=&sort=relevance&sortdir=desc&col=3&col=1&col=4&col=2&startdate=0&enddate=0&xsl=xml&page=2"/>
<link page="next" url="../servlet/SearchServlet?query=news&filter=&sort=relevance&sortdir=desc&col=3&col=1&col=4&col=2&startdate=0&enddate=0&xsl=xml&page=2"/>
<link page="date" url="../servlet/SearchServlet?query=news&filter=&sort=date&col=3&col=1&col=4&col=2&startdate=0&enddate=0&page=1&xsl=xml"/>
<link page="alpha" url="../servlet/SearchServlet?query=news&filter=&sort=alpha&col=3&col=1&col=4&col=2&startdate=0&enddate=0&page=1&xsl=xml"/>
<link page="relevance" url="../servlet/SearchServlet?query=news&filter=&sort=relevance&col=3&col=1&col=4&col=2&startdate=0&enddate=0&page=1&xsl=xml"/>
</links>

Search Form Details

The element provides all the information to display the search form as part of the search results. The information available here includes the list of selected collections used for the query.

<searchform url="../servlet/SearchServlet" query="news">
<collections>
<collection id="3" name="Custom_Collection" checked="true"/>
<collection id="1" name="FileSystem_Collection" checked="true"/>
<collection id="4" name="HTTP_Collection" checked="true"/>
<collection id="2" name="RSS_Collection" checked="true"/>
</collections>
</searchform>

Sample query URLs

Filter parameter

http://localhost:8080/searchblox/servlet/SearchServlet?query=news&filter=title:CNN
http://localhost:8080/searchblox/servlet/SearchServlet?query=news&filter=keywords:CNN
http://localhost:8080/searchblox/servlet/SearchServlet?query=news&filter=content:CNN
http://localhost:8080/searchblox/servlet/SearchServlet?facet=true&query=*&filter=title:(bbc%20OR%20Africa)&xsl=xml
http://localhost:8080/searchblox/servlet/SearchServlet?facet=true&query=*&filter=title:(bbc%20AND%20Africa)&xsl=xml
http://localhost:8080/searchblox/servlet/SearchServlet?facet=true&query=*&filter=title:(bbc%20NOT%20Africa)&xsl=xml
http://localhost:8080/searchblox/servlet/SearchServlet?query=*&filter=NOT(contenttype:word)

Default Boolean operator

search for world OR news
localhost:8080/searchblox/servlet/SearchServlet?query=world news
search for world AND news
localhost:8080/searchblox/servlet/SearchServlet?query=world news&default=AND

Facet Filters

http://localhost:8080/searchblox/servlet/SearchServlet?facet=on&xsl=xml&query=time&facet.field=keywords
http://localhost:8080/searchblox/servlet/SearchServlet?facet=on&xsl=xml&query=time&facet.field=keywords&f.keywords.filter=cnn
http://localhost:8080/searchblox/servlet/SearchServlet?facet=on&xsl=xml&query=time&facet.field=keywords&f.keywords.size=100&f.keywords.filter=cnn
http://localhost:8080/searchblox/servlet/SearchServlet?facet=on&xsl=xml&query=*&facet.field=keywords&f.keywords.size=100&f.keywords.notfilter=world
http://localhost:8080/searchblox/servlet/SearchServlet?facet=on&xsl=json&query=*&facet.field=colname&f.colname.notfilter=test

Using More Than 2 Facets
http://localhost:8080/searchblox/servlet/SearchServlet?facet=on&query=news&facet.field=title&facet.field=keywords&f.keywords.size=5&f.title.size=15&f.keywords.filter=cnn&f.title.filter=world
http://localhost:8080/searchblox/servlet/SearchServlet?facet=on&query=news&facet.field=keywords&f.keywords.size=5&f.keywords.filter=cnn&facet.field=size&f.size.range=[*TO100000]&&f.size.range=[100001TO*]&facet.field=indexdate&f.indexdate.range=[*TO2013-07-28T00:00:26]
http://localhost:8080/searchblox/servlet/SearchServlet?facet=on&query=news&facet.field=title&facet.field=keywords&f.keywords.size=5&f.title.size=15&f.keywords.notfilter=cnn&f.title.notfilter=world

Date Facets
Customized Date Facet
date format to be given in html file

<meta name="published" content="2015-03-17T01:50:58"/>
http://localhost:8080/searchblox/servlet/SearchServlet?facet=on&sort=published&sortdir=desc&query=*&facet.field=published&f.published.range=[2013-05-18T01:50:58TO2013-12-17T01:50:58]&f.published.filter=[2013-05-18T01:50:58TO2013-12-17T01:50:58]&page=1&pagesize=60&xsl=xml
Pre-defined Date Facet
http://localhost:8080/searchblox/servlet/SearchServlet?facet=on&sort=lastmodified&sortdir=des&col=1&col=3&col=2&query=*&facet.field=lastmodified&f.lastmodified.range=[2012-06-20TO2013-10-22]&f.lastmodified.filter=[2012-06-20TO2013-10-25]&page=1&pagesize=100&xsl=xml
http://localhost:8088/searchblox/servlet/SearchServlet?facet=on&sort=lastmodified&sortdir=des&query=*&facet.field=lastmodified&f.lastmodified.range.notfilter=[2012-06-20TO2015-10-22]&page=1&pagesize=100&xsl=xml

Updated 2 months ago

Search Parameters


Suggested Edits are limited on API Reference Pages

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