You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _search-plugins/search-relevance/index.md
+57-1Lines changed: 57 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -98,4 +98,60 @@ Setting `size` to a high value (for example, larger than 250 documents) may degr
98
98
{: .note}
99
99
100
100
You cannot save a given comparison for future use, so Compare Search Results is not suitable for systematic testing.
101
-
{: .note}
101
+
{: .note}
102
+
103
+
## Comparing OpenSearch search results with re-ranked results
104
+
105
+
One use case for Compare Search Results is to compare raw OpenSearch results with the same results processed by a re-ranking application. An example of such a re-ranker is **Kendra Intelligent Ranking for OpenSearch**, contributed by the Amazon Kendra team. This plugin takes search results from OpenSearch and applies Amazon Kendra’s semantic relevance rankings calculated using vector embeddings and other semantic search techniques. For many applications, this provides better result rankings.
106
+
107
+
To try Kendra Intelligent Ranking, you must first set up the Amazon Kendra service. To get started, see [Amazon Kendra](https://aws.amazon.com/kendra/). For detailed information, including plugin setup instructions, see [Intelligently ranking OpenSearch (self managed) results using Amazon Kendra](https://docs.aws.amazon.com/kendra/latest/dg/opensearch-rerank.html).
108
+
109
+
Once you've set up Kendra Intelligent Ranking, enter a query in **Query 1** and enter the same query using Kendra Intelligent Ranking in **Query 2**. Then compare the search results from OpenSearch and Amazon Kendra.
110
+
111
+
### Example
112
+
113
+
The following example searches for the text "snacking nuts" in the `abo` index. The documents in the index contain snack descriptions in the `bullet_point` array.
1. Enter the following query, which searches the `bullet_point` field for the search text "snacking nuts", in **Query 1**:
119
+
120
+
```json
121
+
{
122
+
"query": {
123
+
"match": {
124
+
"bullet_point": "%SearchText%"
125
+
}
126
+
},
127
+
"size": 25
128
+
}
129
+
```
130
+
1. Enter the same query with intelligent ranking in **Query 2**:
131
+
132
+
```json
133
+
{
134
+
"query" : {
135
+
"match" : {
136
+
"bullet_point": "%SearchText%"
137
+
}
138
+
},
139
+
"size": 25,
140
+
"ext": {
141
+
"search_configuration":{
142
+
"result_transformer" : {
143
+
"kendra_intelligent_ranking": {
144
+
"order": 1,
145
+
"properties": {
146
+
"title_field": "item_name",
147
+
"body_field": "bullet_point"
148
+
}
149
+
}
150
+
}
151
+
}
152
+
}
153
+
}
154
+
```
155
+
156
+
In the preceding query, `body_field` refers to the body field of the documents in the index, which Kendra Intelligent Ranking uses to rank the results. The `body_field` is required, while the `title_field` is optional.
157
+
1. Select **Search** and compare the results in **Result 1** and **Result 2**.
0 commit comments