Custom Collection

A custom collection enables you to index and search custom content using the SearchBlox REST-API.

To find your API key, visit the Administration > License page.

18591859

To find your SB-PKEY value, Super Admin or Admin can visit the Administration > Users page.

15491549

Creating Custom Collection

You can create a Custom Collection with the following steps:

  • After logging in to the Admin Console, select the Collections tab and click on Create a New
    Collection or "+" icon.
  • Choose Custom Collection as Collection Type.
  • Enter a unique name for your collection (for example, News).
  • Choose Private/Public Collection Access and Collection Encryption as per the requirements.
  • Choose the language of the content (if the language is other than English).
  • Click Save to create the collection.
16481648
  • Once the Custom collection is created you will be taken to the Path tab.
16691669

Custom Collection Settings

  • To learn more details on REST-API, parameters and URLs read REST API.
  • The following table has the list of basic settings available in Custom collection

Setting

Description

Relevance Stemming

When stemming is enabled, inflected words are reduced to root form. For example, "running", "runs", and "ran" are the inflected form of run.

Relevance
Spelling Suggestions

Provide spelling suggestions for the collection. The default is YES.

Keyword-in-Context Display

The keyword-in-context returns search results with the description displayed from content areas where the search term occurs.

HTML Parser Settings

This setting configures the HTML parser to read the description for a document from one of the HTML tags: H1, H2, H3, H4, H5, H6.

HTTP Basic Authentication

When the spider requests a document, it presents these values (user/password) to the HTTP server in the Authorization MIME header. The attributes required for basic authentication are username, password.

HTTP Proxy Server Setting

When HTTP content is accessed through proxy servers, the proxy server settings are required to enable the spider to successfully access and index content. The attributes required for proxy server indexing are:
Proxy Server URL, Username and Password

Enable Content API

Provides the ability to crawl the document content with special characters included.

16261626 15431543

Data Fields Tab

Using Data Fields tab we can create custom fields for search and we can see the Default Data Fields with non-encrypted collection. SearchBlox supports 4 types of Data Fields as listed below:

Keyword
Number
Date
Text

  • Once the Data fields are configured, collection must be cleared and re-indexed to take effect.

To know more about Data Fields please refer to Data Fields Tab

SearchBlox API Explorer

  • SearchBlox provides a built-in tool to try out the API with examples called the API Explorer.
  • The API Explorer can be accessed using the link:
    https://localhost:8443/api
  • The API Explorer link is also available on the page while selecting the custom collection path setting.
  • Using SearchBlox API Explorer, you can make the following REST API requests related to Custom collection
    • Create Collection
    • Clear Collection
    • Delete Collection
    • Index Document
    • Update document meta data
    • Delete Document
  • To try other API requests please use any API tools such as Postman.
  • Providing SB-PKEY is mandatory for all API requests. API Explorer has a Private Key text box to provide SB-PKEY value whereas the Postman header parameter can be used to serve the same purpose.
11291129
  • The input to this SearchBlox REST-API should be in JSON format
  • We can click on the "Try it out" option to edit the JSON input request
  • The user needs to provide the correct API key, collection name, the right location, etc.
  • While indexing, the JSON code is displayed in separate pop-ups, and later the status message is displayed.
562562 562562

SearchBlox also supports HTTP API and many other APIs, however currently they are not compatible with API Explorer. Tools such as PostmanAPI can be used to try out HTTP API.


Did this page help you?