Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Commit

Permalink
Changing query mapping. Updating readme and version number.
Browse files Browse the repository at this point in the history
  • Loading branch information
jzonthemtn committed May 29, 2024
1 parent 08a0174 commit 5103e23
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ The `ubi` block can contain the following parameters. All parameters are optiona
* `user_query` - The user-entered query. This is meant to be the actual text the user provided to initiate the search.
* `client_id` - A unique identifier for the originator of the query. The client may be a user, an application, or any other originator of the query. The `client_id` can be in any format but we use UUIDs in the examples.
* `object_id_field` - The name of a field in the index that contains a unique identifier for each result. If not provided, the `_id` field is used.
* `query_attributes` - A map of arbitrary key/value pairs that will be indexed along with the query. This can be used to capture additional information about the query, such as an experiment ID or other details.

Following is an example query that provides the parameters:

Expand All @@ -99,7 +100,10 @@ curl -s http://localhost:9200/your-index/_search -H "Content-Type: application/j
"query_id": "12300d16cb-b6f1-4012-93ebcc49cac90426",
"user_query": "Toner",
"client_id": "c4af7ca2-d6d2-4326-a41f-e616ebdd3d7b",
"object_id_field": "product_name"
"object_id_field": "product_name",
"query_attributes": {
"experiment_id": "12345"
}
}
},
"query": {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
opensearchVersion = 2.14.0
ubiVersion = 0.0.11
ubiVersion = 0.0.12
2 changes: 1 addition & 1 deletion src/main/resources/queries-mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"properties": {
"timestamp": { "type": "date" },
"query_id": { "type": "keyword", "ignore_above": 100 },
"query": { "type": "flat_object" },
"query": { "type": "text" },
"query_response_id": { "type": "keyword", "ignore_above": 100 },
"query_response_hit_ids": { "type": "keyword" },
"user_query": { "type": "text",
Expand Down

0 comments on commit 5103e23

Please sign in to comment.