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.

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

Creating a Custom Collection

Follow these steps to create a new Custom Collection:

  1. Log in to the Admin Console
  2. Navigate to the Collections tab
  3. Click on "Create a New Collection" or the "+" icon
  4. Select "Custom Collection" as the Collection Type
  5. Enter a unique name for your collection (e.g., "Custom API")
  6. Configure Collection Access settings (Private/Public)
  7. Set Collection Encryption according to your security requirements
  8. Select the content language (if other than English)
  9. Click "Save" to create your collection
  • Once the Custom collection is created you will be taken to the Path tab.

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
SettingDescription
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 DisplayThe keyword-in-context returns search results with the description displayed from content areas where the search term occurs.
HTML Parser SettingsThis 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 AuthenticationWhen 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 SettingWhen 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 APIProvides the ability to crawl the document content with special characters included.

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.

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

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.