SearchBlox

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!

Guides

Search Parameters

Search Parameters

SearchBlox supports a wide array of search parameters. These parameters can be provided in the search API URL, regular search, and advanced search. We can classify the parameters as

  • Basic Search Request Parameters
  • Faceted Search Request Parameters
  • Advanced Search Request Parameters

Basic Search Request Parameters:

New search API and search servlet API support a list of parameters that we have referred to as basic search parameters.

Sample Search URLs with Search Parameters

Sample search URLs with parameters for New Search API and Search Servlet API:

Sample New Search API URL with basic parameters
http://localhost:8080/searchblox/rest/v2/api/search?pretty=true&col=1&query=*&page=2&pagesize=5&sort=alpha&sortdir=asc

Sample Search Servlet API URL with basic parameters
http://localhost:8080/searchblox/servlet/SearchServlet?col=1&query=*&page=2&pagesize=5&sort=alpha&sortdir=asc

List of Basic 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

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.

adsize

within the value specified in featured results dashboard for Featured search results per page

This field specifies the number of featured results to be displayed in search servlet or API
Note: This value will be within the range specified in featured results dashboard page.
So if you want more featured results increase the value (Featured search results per page) in Featured results dashboard

Facet Filter Request Parameters

  • New search API and search servlet API support a list of facet filter parameters, these parameters are used in SearchBlox faceted search pages for facet filters and also can be used in customized searches.
  • To learn more on faceted search filter read: Facets Set up

Sample Search URLs with Facet Search Parameters

Sample search URLs with parameters for New Search API and Search Servlet API:

Sample New Search API URL with basic parameters
http://localhost:8080/searchblox/rest/v2/api/search?pretty=true&col=1&query=*&facet.field=keywords&f.keywords.filter=africa

Sample Search Servlet API URL with basic parameters
http://localhost:8080/searchblox/servlet/SearchServlet?col=1&query=*&xsl=json&*&facet.field=keywords&f.keywords.filter=africa

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

Advanced Search Request Parameters

Search Servlet API supports advanced search request parameters.

Sample Advanced Search URLs with Search Parameters

Sample search URLs with parameters for Advanced Search
http://localhost:8080/searchblox/servlet/SearchServlet?fe=utf-8&st=adv&col=1&q_all=international&q_phr=world%2520news&q_low=cnn&q_not=corona&language=&contenttype=&startdate=0&oc=all&pagesize=10

List of 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

oc

all

all, title, description, content, URL

Occurrence

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

Sample Search Query URLs with Parameters

Filter parameter

Default Boolean operator

Facet Filters

Single Facet

Multiple Facets

Date Facets

Customized Date Facet

Pre-defined Date Facet

👍

General Information

  • Facet filters display results count JSON/XML.
  • Facet filters are AND filters.
  • Normal Filters can be used with AND as well as OR.
  • Facet filters can only be given in URL.
  • Filters can be given as a URL parameter or as fielded search.
  • Use default=AND to enable AND search.
  • View results in JSON or XML in a parametrized search to view the relevant response.* When
    using Advanced Search use parameters specific to the same.

Updated 3 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.