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!


Slack Connector

Configuring SearchBlox

Before using Slack Connector, SearchBlox has to be installed and set up successfully. Then create a Custom Collection.

Configuring Slack Connector


Install Java JDK 1.8.x for the Slack Connector to work. The environment variable is set as shown here (for Windows):

  JAVA_HOME = C:\Program Files\Java\jdk1.8.0_31

Link to download Java:
For Linux, please make sure that JDK1.8 is installed in the server.

Kafka and Zookeeper


  • Go to C:\Kafka\config\ and edit the line “log.dirs=/tmp/kafka-logs” to “log.dir= C:\Kafka\kafka-logs”.
  • Go to C:\Kafka\config\ and edit the line “dataDir=/tmp/zookeeper-logs” to “dataDir=C:\Kafka\zookeeper-logs”.

Start Zookeeper
Start the Zookeeper service first.
In Windows, open the command prompt, then go to C:\kafka\bin\Windows and run the following command:

    zookeeper-server-start.bat C:\Kafka\config\

In Linux, open the terminal then go to /opt/Kafka/bin and run the following command:

   ./ /opt/Kafka/config/

Start Kafka service
Open another command prompt/terminal.
In Windows, open the command prompt, then go to C:\kafka\bin\Windows and run the following command:

    kafka-server-start.bat C:\Kafka\config\

In Linux, open the terminal, then go to /opt/Kafka/bin and run the following command:

    ./ /opt/Kafka/config/

Steps to Set Up Slack Connector
Please contact [email protected] to request the download link for SearchBlox Slack connector.

  • Download the SearchBlox Slack connector. Extract the downloaded zip file to C:\searchblox-slack-bot for Windows, and /opt/searchblox-slack-bot for Linux, and name the folder searchblox-slack-bot.
  • Unzip under C:* or /opt*.
  • After extracting, C:\searchblox-slack-bot or /opt/searchblox-slack-bot should contain: searchblox-slack-bot-0.1.0.jar, and this readme.txt



In Linux, make sure that the necessary permissions have been provided to the folder /opt by using the CHMOD command for writing log files and executing jar files.

Enter the details in C:/searchblox-slack-bot/ or \opt\searchblox-slack-bot\ The properties with the prefix slackapi are slack properties. The properties with prefix zookeeper are Zookeeper properties. The properties with prefix Kafka are Kafka properties. The properties with prefix searchblox are SearchBlox properties.** *


Slack authentication token.


The chat stream.


Hostname where Kafka runs.


Default Kafka port number.


Hostname where Zookeeper runs.


Zookeeper port number of. Default is 2181.


SearchBlox rest API URL. Make changes based on IPaddress and port number used.


SearchBlox application's API key in Menu → Admin.


Name of custom collection.

  • The content details are provided here:
#slack authentication token
slackapi.authenticationToken = xoxp-141561976914-140855357792-141890124018-5e3bf599ec71b8c12fe44d13f75e9dd1

#kafka properties
kafka.topic = chat-stream
kafka.hostName = localhost
kafka.port = 9092

#zookeeper properties
zookeeper.hostName = localhost
zookeeper.port = 2181

#searchblox properties
searchblox.restJsonApi  = http://localhost:8080/searchblox/rest/v1/api/add
searchblox.apiKey = 21E176E310D04536534D1890674DCAC4
searchblox.colName = slack
  • Start SearchBlox.
  • Make sure to run Zookeeper first, and then Kafka, using the steps outlined in the preceding prerequisites section.
  • The log files will be written to C:\searchblox-slack-bot or /opt/searchblox-slack-bot.
  • Port 8181 must available before running the following command. If it is not available, change -Dserver.port number to any available port number.
  • For Windows, open the command prompt, go to C:\searchblox-slack-bot and execute:
    java -DLOG_PATH="C:\searchblox-slack-bot" -DLOG_LEVEL=DEBUG -DpropertySource=file:C:/searchblox-slack-bot/ -Dserver.port=8181 -jar searchblox-slack-bot-0.1.0.jar
  • For Linux, open the command prompt, go to /opt/searchblox-slack-bot and execute:
    java -DLOG_PATH="/opt/searchblox-slack-bot" -DLOG_LEVEL=DEBUG -DpropertySource=file:/opt/searchblox-slack-bot/ -Dserver.port=8181 -jar searchblox-slack-bot-0.1.0.jar.

Once the connector gets started, messages that are sent to the #general or #random channel in Slack will be indexed simultaneously.



The log level in the above command is set to DEBUG, this prints out the detailed explanation of requests and responses to the log. This can be changed to INFO for a short explanation.

Updated 5 months ago

Slack Connector

Suggested Edits are limited on API Reference Pages

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