I've created more elasticsearch indexes for different type of information in our system. Mainly they are used individually to look for elements in a particular index. However we have a general search on our home page, where the user can search in all indexes. E.g. the following search will be used:
curl -XGET 'localhost:9200/my-index-%2A/_doc/_search?pretty' -H 'Content-Type: application/json' -d'
{
"size":25,
"query":{
"bool":{
"must":[
{
"term":{"languageCode":"de"}
},
{
"bool":{
"should":[
{
"simple_query_string":{
"query":"search-term",
"fields":[
"title_*.language^50",
"description_*.language^10",
"content_*.language^1"
]
}
}
]
}
}
]
}
}
}'
I'm using in this search many indexes with wildcard (my-index-*/_doc/_search
). It works absolutely correct, but my problem is, that I want that one of the indexes generates less score as the others. Is there any possibility to give less weight to an index in a multi-index query?