Skip to content

Update search-application-api.asciidoc #103419

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 8.11
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ PUT _application/search_application/my-search-app
{
"query": {
"text_expansion": {
"ml.inference.{{.}}_expanded.predicted_value": {
"{{.}}": {
"model_text": "{{query_string}}",
"model_id": "<elser_model_id>"
}
Expand All @@ -247,7 +247,7 @@ PUT _application/search_application/my-search-app
}
""",
"params": {
"elser_fields": ["title", "meta_description"],
"elser_fields": ["title_embedding", "meta_description_embedding"],
"text_fields": ["title", "meta_description"],
"query_string": "",
"rrf": {
Expand All @@ -271,7 +271,7 @@ POST _application/search_application/my-search-app/_search
{
"params": {
"query_string": "What is the most popular brand of coffee sold in the United States?",
"elser_fields": ["title", "meta_description"],
"elser_fields": ["title_embedding", "meta_description_embedding"],
"text_fields": ["title", "meta_description"],
"rrf": {
"window_size": 50,
Expand Down Expand Up @@ -323,7 +323,7 @@ PUT _application/search_application/my_search_application
{{#elser_fields}}
{
"text_expansion": {
"ml.inference.{{name}}_expanded.predicted_value": {
"{{name}}": {
"model_text": "{{query_string}}",
"model_id": ".elser_model_1",
"boost": "{{boost}}"
Expand Down Expand Up @@ -360,8 +360,8 @@ PUT _application/search_application/my_search_application
"text": false,
"elser": false,
"elser_fields": [
{"name": "title", "boost": 1},
{"name": "description", "boost": 1}
{"name": "title_embedding", "boost": 1},
{"name": "description_embedding", "boost": 1}
],
"text_fields": [
{"name": "title", "boost": 10},
Expand Down Expand Up @@ -411,8 +411,8 @@ POST _application/search_application/my_search_application/_search
"elser": true,
"query_string": "where is the best mountain climbing?",
"elser_fields": [
{"name": "title", "boost": 1},
{"name": "description", "boost": 1}
{"name": "title_embedding", "boost": 1},
{"name": "description_embedding", "boost": 1}
]
}
}
Expand All @@ -429,8 +429,8 @@ POST _application/search_application/my_search_application/_search
"text": true,
"query_string": "where is the best mountain climbing?",
"elser_fields": [
{"name": "title", "boost": 1},
{"name": "description", "boost": 1}
{"name": "title_embedding", "boost": 1},
{"name": "description_embedding", "boost": 1}
],
"text_query_boost": 4,
"min_score": 10
Expand Down Expand Up @@ -484,7 +484,7 @@ PUT _application/search_application/my_search_application
{{#elser_fields}}
{
"text_expansion": {
"ml.inference.{{name}}_expanded.predicted_value": {
"{{name}}": {
"model_text": "{{query_string}}",
"model_id": "<elser_model_id>"
}
Expand All @@ -502,10 +502,10 @@ PUT _application/search_application/my_search_application
"min_score": "10",
"elser_fields": [
{
"name": "title"
"name": "title_embedding"
},
{
"name": "description"
"name": "description_embedding"
}
]
}
Expand Down