How can I get the score of the underlying matching query in a bool query in ElasticSearch? -


i have complex search, performing large search articles match @ least 1 entity in group of many entities.

what noticed add more entities, scores dramatically change because should clause grows in size.

here's example of query 2 entities:

{   "size": 50,   "track_scores": true,   "min_score": 0.05,   "sort": [     {       "timestamp": {         "order": "desc"       }     }   ],   "query": {     "bool": {       "should": [         {           "bool": {             "should": [               {                 "function_score": {                   "functions": [                     {                       "boost_factor": 1000000                     }                   ],                   "query": {                     "terms": {                       "relatedprofiles": [                         "somethingelse/124026966662",                         "somelocation/707765"                       ]                     }                   },                   "boost_mode": "replace"                 }               },               {                 "bool": {                   "should": [                     {                       "multi_match": {                         "type": "phrase",                         "query": "generic systems",                         "operator": "and",                         "fields": [                           "content.title",                           "content.description"                         ]                       }                     },                     {                       "multi_match": {                         "type": "phrase",                         "query": "generic systems, inc.",                         "operator": "and",                         "fields": [                           "content.title",                           "content.description"                         ]                       }                     }                   ],                   "minimum_should_match": "1"                 }               }             ],             "minimum_should_match": "1",             "_name": "0e7da739-1d18-448b-caa2-5c615a59d108"           }         },         {           "bool": {             "should": [               {                 "function_score": {                   "functions": [                     {                       "boost_factor": 1000000                     }                   ],                   "query": {                     "terms": {                       "relatedprofiles": [                         "somelocation/162479",                         "somethingelse/32b95cc3-a363-47c3-2ac1-86fdb3b7d108"                       ]                     }                   },                   "boost_mode": "replace"                 }               },               {                 "bool": {                   "should": [                     {                       "multi_match": {                         "type": "phrase",                         "query": "somebusiness computer inc",                         "operator": "and",                         "fields": [                           "content.title",                           "content.description"                         ]                       }                     },                     {                       "multi_match": {                         "type": "phrase",                         "query": "somebusiness, inc",                         "operator": "and",                         "fields": [                           "content.title",                           "content.description"                         ]                       }                     }                   ],                   "minimum_should_match": "1"                 }               }             ],             "minimum_should_match": "1",             "_name": "00cc4b36-ce6b-4816-e61e-b7124344d108"           }         }       ],       "minimum_should_match": "1"     }   },   "filter": {     "bool": {       "must": [         {           "bool": {             "should": [               {                 "bool": {                   "must": [                     {                       "term": {                         "type": "news"                       }                     },                     {                       "terms": {                         "language": [                           "eng"                         ]                       }                     }                   ]                 }               },               {                 "terms": {                   "type": [                     "social",                     "job",                     "unknown"                   ]                 }               }             ]           }         },         {           "range": {             "timestamp": {               "lt": "2015-05-13t09:25:40.605",               "gt": "2013-05-13t09:25:40.605"             }           }         }       ]     }   } } 

how can underlying match score? or, @ least, score of section below name query?

maybe https://elastic.co/webinars/elasticsearch-query-dsl has insights; later in video talks dis max query.

from https://www.elastic.co/guide/en/elasticsearch/reference/1.5/query-dsl-dis-max-query.html

"we want primary score 1 associated highest boost, not sum of field scores (as boolean query give)."


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -