Hey I realize this is an old thread, but just in case anyone else has this 
problem, it's almost definitely a versioning issue... updating to 0.90.10 
solved it for me.  

I think I got an older version by using `brew install`, but 
download/installation directly from the website is super 
easy: http://www.elasticsearch.org/download/



On Friday, November 22, 2013 4:37:40 AM UTC-5, paul wrote:
>
> hi Alex i tried as suggested but it seams i am still missing something , 
> when i tried the query below i still get No query registered for 
> [function_score]] exception
>
>
> {
>   "query": {
>     "function_score": {
>       "functions": [
>         {
>           "DECAY_FUNCTION": {
>             "Tution": {
>               "reference": "10000",
>               "scale": "5000"
>             }
>           }
>         }
>       ],
>       "query": {
>         "match": {
>           "programs": "computer science"
>         }
>       },
>       "score_mode": "multiply"
>     }
>   }
> }
>
> On Friday, 22 November 2013 14:04:49 UTC+5:30, Alexander Reelsen wrote:
>>
>> Hey,
>>
>> you need to use one of the score functions mentioned in 
>> http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html#_score_functions<http://www.google.com/url?q=http%3A%2F%2Fwww.elasticsearch.org%2Fguide%2Fen%2Felasticsearch%2Freference%2Fcurrent%2Fquery-dsl-function-score-query.html%23_score_functions&sa=D&sntz=1&usg=AFQjCNFBAPkmuOAra99m7KO_A6OltCBZoQ>
>>
>> So either script_score, boost factor, random or one of the decay 
>> functions.. the error message is also telling you not to forget the query 
>> field inside of the function score.
>>
>>
>> --Alex
>>
>>
>> On Fri, Nov 22, 2013 at 9:31 AM, paul <[email protected]> wrote:
>>
>>> What should be defined inside the function , any example queries. could 
>>> not find one on elastic search page.this throws a exception  No query 
>>> registered for [function_score]]
>>> {
>>>    "query":{
>>>       "function_score":{
>>>          "query":{
>>>             "match":{
>>>                "programs":"computer science"
>>>             }
>>>          },
>>>          "functions":[
>>>             {
>>>                "filter":{
>>>                   "range":{
>>>                      "tution":{
>>>                         "from":10000,
>>>                         "to":20000
>>>                      }
>>>                   }
>>>                },
>>>                "FUNCTION":{
>>>  "boost": "3"
>>>                }
>>>             }
>>>          ],
>>>          "score_mode":"avg",
>>>          "boost_mode":"avg"
>>>       }
>>>    }
>>> }
>>>
>>> -- 
>>> 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].
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>

-- 
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/69eb1edd-ab2a-47d6-92dd-cb20e6b70116%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to