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

MongoDB Collection

A MongoDB collection can be created using the steps below:

  • After logging in to the Admin Console, click on the Add Collection button. The Add Collection screen will be displayed.
  • Enter a unique name for your collection (for example, MongoDB).
  • Click on the MongoDB collection radio button.
  • Click Add to create the collection.

Settings

The Settings sub-tab holds collection settings for MongoDB and tunable parameters for the search. MongoDB setting values must be set explicitly by the user for MongoDB collections. SearchBlox also comes pre-configured with parameters when a new collection is created.

Host Name

IP address or name of the MongoDB host (default value is localhost).

Port Number

Port number of MongoDB.

MongoDB Type

Default value is local.

User Name

User name in MongoDB (leave the username and password fields empty if no username is available).

Password

Password used in MongoDB.

MongoDB Database Name

Database name to be indexed.

MongoDB Database Collection

Collection to be indexed.

Bulk Size

Number of values/rows to be taken by the river at a time for indexing.

Keyword-in-Context Display

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

Boosting

Boost search terms for the collection by setting a value greater than 1 (maximum value 9999).

Stemming

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

Spelling Suggestions

When enabled, a spelling index is created at the end of the indexing process.

Steps to Set Up MongoDB for Searchblox Indexing
Steps for setting replica and oplog in MongoDB:

  • Start MongoDB with the command mongod:
             mongod --replSet rs0 --oplogSize 100
    
  • Start MongoDB with the command mongo and run:
> show dbs
local (empty)
> use local
switched to db local
> rs.initiate()
{
"info2" : "no configuration explicitly specified -- making one",
"me" : "MONGOSERVER:27017",
"info" : "Config now saved locally. Should come online in about a minute.",
"ok" : 1
}
> show collections
oplog.rs
system.replset
rs0:PRIMARY>
  • Create collections:
    settings
    dbtype : local
    dbname : <database name>
    collection name: <collection name within local>
    

Indexing and Other Operations

The following operations can be performed in a MongoDB collection:

Index

Starts the indexer for the selected collection.

Clear

Clears the current index for the selected collection.

  • Indexer activity is controlled from the Index sub-tab in the collection. The current status of an indexer for a particular collection is indicated.
  • In MongoDB collections, indexing and clear operations can be performed only from index sub-tab.
  • Scheduling cannot be performed in MongoDB collections.