OpenSearch
OpenSearch copied to clipboard
[Feature Request] UBI should be able to accept custom attributes
Is your feature request related to a problem? Please describe
UBI allows queries to have a client-side generated query_id, along with optional user_query, object_id, and client_id values. It would be nice to allow the client to send custom attributes to associate with the query.
Describe the solution you'd like
The client should be able to send custom attributes in the ubi block of ext in search requests. For instance, to send a store_id, the user could send a request:
#!/bin/bash -e
curl http://localhost:9200/ecommerce/_search -H "Content-Type: application/json" -d'
{
"ext": {
"ubi": {
"query_id": "12300d16cb-b6f1-4012-93ebcc49cac90426",
"user_query": "toner",
"object_id": "name,
"client-id": "01dabe13-3d25-42d2-a8f8-be459df2105d",
"store_id": "store1"
}
},
"query": {
"match": {
"name": "toner"
}
}
}'
Additional context
This relates to UBI which is described in https://github.com/opensearch-project/OpenSearch/issues/12084 and https://github.com/opensearch-project/OpenSearch/issues/13545.
This issue can be assigned to myself.
[Triage - attendees 1 2 3 4] @jzonthemtn Thanks for filing. Looking forward to seeing progress here.
Closing this RFC because the initial implementation is now available at https://github.com/opensearch-project/user-behavior-insights and new issues can be created there.