I'm a newbie of ES but I have a question below is my document
{"id" : 1, "title" : "Mr", "firstname" : "Money" , "lastname" : "Gold"}
{"id" : 2, "title" : "Mr", "firstname" : "Silver" , "lastname" : "Money}
{"id" : 3, "title" : "Mr", "firstname" : "Platinum" , "lastname" :
"Bronze"}
And I query data via API that developer provides as below and I cannot
change query format but I can change index structure or rebuild it
{
"query": {
"filtered": {
"query": {
"match_all": {
}
},
"filter": {
"and": [{
"or": [{
"bool": {
"must": {
"terms": {
"firstname.raw": ["Money"],
}
}
}
},
{
"bool": {
"must": {
"terms": {
"lastname.raw": ["Money"]
}
}
}
}]
},
{
"bool": {
"must": {
"terms": {
"title.raw": ["Mr"]
}
}
}
}]
}
}
}
}
That return id no. 1 and 2 and both score is 1, so I want to set priority
"firstname" field higher than "lastname" field.
Is this possible? How can I do?
Please advise me.....
Thanks
Hiko
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/ffa0b059-db70-4a65-956a-75fcec2e6a1b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.