elasticsearch - function score groovy script not returning any result -


my query

{     "query": {     "function_score": {     "functions": [{     "script_score": {                 "lang": "groovy",                 "script_file": "category-score",                 "params": {                   "my_modifier": "doc['category'].value"                 }               }     },     {     "script_score": {                 "lang": "groovy",                 "script_file": "popularity-score",                 "params": {                   "my_modifier": "doc['popularity'].value"                 }               }     },     {     "script_score": {                 "lang": "groovy",                 "script_file": "type-score",                 "params": {                   "my_modifier": "doc['finder_type'].value"                 }               }     }     ],     "query": {     "filtered": {     "query": {"multi_match": {     "query": "rent,buy",     "fields": ["category","categorytags"]     }},"filter": {     "bool" : {"must": [{"terms" : { "city": ["mumbai"] }}]}     },"_cache" : true     }     },     "score_mode": "sum",     "boost_mode": "replace"     }     }} 

and 4 script files looks

(my_modifier == 'rent,buy' ? 10 : 0)  log(my_modifier1.value)  (my_modifier2 > 0 ? 20 : 0) 

i trying calculate score of matching documents in function score 3 script_score functions. scripts getting compiled on startup can see in logs don't return me result.es version 1.6.0. how can enable inline/dynamic scripting on es-1.6.0 tried around many settings changes in elasticsearch.yml es comeup breaking changes 1.6.0 release scripting module.

              "my_modifier": "doc['finder_type'].value" 

params should value , not script.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -