What is the use of Boost in elastic search?

Hello,

Please explain use of query time boosting in elastic search.

Is https://www.elastic.co/guide/en/elasticsearch/guide/current/query-time-boosting.html enough?

thanks for valuable reply

but it is not working in my case.

post requst http://localhost:9200/hospitalsdev/hospitals/_search?size=10000&from=0

{
"query": {
"bool": {
"should": [
{ "match": { "providerName": {"query":"amit","operator":"and","boost": 6} }},
{ "match": { "email": {"query":"amit","operator":"and","boost": 5} }},
{ "match": { "website": {"query":"amit","operator":"and","boost": 4} }}

  ]
}

}
}

this query means first give priority providerName than email than website.

it gives this result and not give priority to providerName . In first record providerName not have amit but it on first place.

{
"took": 4,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 15,
"max_score": 1.4952936,
"hits": [
{
"_index": "hospitalsdev",
"_type": "hospitals",
"_id": "572b602929ead4c598b1b269",
"_score": 1.4952936,
"_source": {
"_id": "572b602929ead4c598b1b269",
"email": "amit.singh3@gmail.com",
"emergencyNumber": "",
"faxNumber": "0",
"telephoneNumber": "2650585/2652585",
"stdCode": "135",
"state": "Uttaranchal",
"city": "Dehradun",
"pinCode": "248001",
"addressArea": "",
"address2": "E.C.Road",
"address1": "122/I",
"providerName": "AMRITSAR EYE CLINIC",
"providerNumber": 37018
}
},
{
"_index": "hospitalsdev",
"_type": "hospitals",
"_id": "572b602929ead4c598b1ac4f",
"_score": 1.458293,
"_source": {
"_id": "572b602929ead4c598b1ac4f",
"email": "amit.prakash728@gmail.com",
"emergencyNumber": "",
"faxNumber": "-",
"telephoneNumber": "9770309758",
"stdCode": "0",
"state": "Jharkhand",
"city": "Ranchi",
"pinCode": "534009",
"addressArea": "Ranchi",
"address2": "",
"address1": "Near Booty Mor",
"providerName": "SURYA HOSPITAL & RESEARCH CENTRE",
"providerNumber": 14985
}
},
{
"_index": "hospitalsdev",
"_type": "hospitals",
"_id": "572b602929ead4c598b1b2cc",
"_score": 1.2816556,
"_source": {
"_id": "572b602929ead4c598b1b2cc",
"email": "citizen_amit1@yahoo.in",
"emergencyNumber": "",
"faxNumber": "2521318",
"telephoneNumber": "6589080",
"stdCode": "265",
"state": "Gujarat",
"city": "Vadodara",
"pinCode": "390019",
"addressArea": "",
"address2": "Ajwa-Waghodia Ring Road",
"address1": "Nr. Dabhoi Dashalad Bhavan",
"providerName": "CITIZEN HOSPITAL",
"providerNumber": 38169
}
}
]
}
}

i am not mention complete result because no space left (5000 word limit)

Please format your code.

Why do you think that the first document is not more relevant than the 2nd and 3rd ones?

BTW you can use explain option to understand how the score is computed.