Tools and Plugins
There are several available tools and plugins supporting UBI.
UBI Plugin for OpenSearch
The OpenSearch UBI plugin facilitates persisting client-side events (e.g. item clicks, scroll depth) and OpenSearch queries for the purpose of analyzing the data to improve search relevance and user experience. The concepts of UBI and this plugin project was originally proposed in the OpenSearch UBI RFC.
To use the plugin, first download the release appropriate for your version of OpenSearch. Next, install the plugin:
bin/opensearch-plugin install file:/opensearch-ubi-1.0.0-os2.14.0.zip
With the plugin installed, you can now capture OpenSearch queries:
curl -s http://localhost:9200/ecommerce/_search -H "Content-Type: application/json" -d'
{
"ext": {
"ubi": {
}
},
"query": {
"match": {
"name": "toner"
}
}
}'
And you can send client-side events to OpenSearch:
curl -s http://localhost:9200/ecommerce/_search -H "Content-Type: application/json" -d'
{
"ext": {
"ubi": {
}
},
"query": {
"match": {
"name": "toner"
}
}
}'
To see these events, check the ubi_queries
and ubi_events
indexes:
curl http://localhost:9200/ubi_queries/_search
curl http://localhost:9200/ubi_events/_search
UBI Plugin for Elasticsearch
The Elasticsearch UBI Plugin is a fork of the OpenSearch UBI plugin. This plugin provides similar core functionality but other functionality will differ.
To use the plugin, first download the release appropriate for your version of Elasticsearch. Next, install the plugin:
bin/elasticsearch-plugin install file:/elasticsearch-ubi-1.0.0-es2.14.0.zip
With the plugin installed, you can now capture OpenSearch queries:
curl -s http://localhost:9200/ecommerce/_search -H "Content-Type: application/json" -d'
{
"ext": {
"ubi": {
}
},
"query": {
"match": {
"name": "toner"
}
}
}'
And you can send client-side events to OpenSearch:
curl -s http://localhost:9200/ecommerce/_search -H "Content-Type: application/json" -d'
{
"ext": {
"ubi": {
}
},
"query": {
"match": {
"name": "toner"
}
}
}'
To see these events, check the ubi_queries
and ubi_events
indexes:
curl http://localhost:9200/ubi_queries/_search
curl http://localhost:9200/ubi_events/_search