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

Access to Elasticsearch

Accessing Elasticsearch within SearchBlox

SearchBlox ingests and queries data from Elasticsearch, and you can access Elasticsearch directly to view the indexed data. However, making changes to mappings directly within Elasticsearch can cause issues while querying them from SearchBlox.

To check the status of Elasticsearch indices, access the following link:
https://localhost:9200/_cat/indices

username: admin
password: admin

The elasticsearch url, credentials and path of Elasticsearch installation would be provided in ../webapps/searchblox/WEB-INF/elasticsearch.yml as below:
searchblox.elasticsearch.url: https://localhost:9200/
searchblox.basic.username: admin
searchblox.basic.password: admin
es.home: C:\SearchBloxServer\elasticsearch

Access Elasticsearch using network host

If you want to access elasticsearch using your network IP then make the following changes in
../elasticsearch/config/elasticsearch.yml
network.bind_host: 0.0.0.0
Restart the server, you should be able to access Elasticsearch outside your host server.

Disable SSL in Elasticsearch

If you want to disable SSL in elasticsearch then give true as the value to the field as below in ../elasticsearch/config/elasticsearch.yml
opendistro_security.disabled: true

Status of Elasticsearch Indices

If you are having trouble viewing the collections from the Admin dashboard, there could be a problem with the Elasticsearch indices. Check the status of the indices by going to
https://localhost:9200/_cat/indices.

username: admin
password: admin

The first column represents the status. The status of the indices can be green or yellow. A red status means that the index has crashed. For SearchBlox to function properly, you must delete that index and restart.

Deleting Elasticsearch Indices

You may need to delete the SearchBlox index if the following problems are encountered:

  • You cannot access the index from the Admin Dashboard.
  • You cannot index or delete the collection.

For example, if collection number 2 is red, that status will be shown next to idx002. Then you would need to delete idx002 in Elasticsearch. You can use any elasticsearch monitoring tool. Or you can use Kibana that is available in SearchBlox (Refer below section ).
To delete an index directly, follow the steps below:

  • To delete idx002 (or any index that has turned red in https://localhost:9200/_cat/indices) execute the following statement
    DELETE idx002
    You will want to see the message: "acknowledged": "true".
  • Then, delete all the indices that you want to delete from Elasticsearch.
  • Restart SearchBlox.

Using Kibana to Access Elasticsearch

Kibana can also be used with Elasticsearch. Click here to learn how to start and run Kibana.
Start Kibana and access Dev Tools from the lefthand menu.

To view the indices, use the following command as shown in the above screenshot.
GET _cat/indices

To delete an index, use the DELETE command as shown below:

If you want to clear index from elasticsearch i.e., delete all the data in an index say idx001 use the command below

POST idx009/_delete_by_query
{
    "query": {
    "match_all": {}
  }
}

Please note that all data in index 1 would be cleared out on using the above which cannot be retrieved again and the collection has to be reindexed.

Disabling https in Elasticsearch

If you want to run Elasticsearch in http, please make the following changes
1.

Updated 17 days ago

Access to Elasticsearch


Suggested Edits are limited on API Reference Pages

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