Hi
I just started playing around with elastic search and I am trying out the
examples in the website with my data. I am trying to get custom scoring
working. I am following the example from
http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/query-dsl-function-score-query.html
But unable to get the example working
{
"query" : {
"function_score": {
"boost_mode": "replace",
"query": {"design.PRODUCT_DESC":"cool"},
"script_score": {
"params": {
"param1": 2,
"param2": 3.1
},
"script": "_score * doc['design.CLICKS'].value / pow(param1,
param2)"
}
}
}
}
I tried this query and i get the error
Caused by: org.elasticsearch.index.query.QueryParsingException: [designs]
[_na] query malformed, no field after start_object
at
org.elasticsearch.index.query.QueryParseContext.parseInnerQuery(QueryParseContext.java:216)
at
org.elasticsearch.index.query.functionscore.FunctionScoreQueryParser.parse(FunctionScoreQueryParser.java:89)
at
org.elasticsearch.index.query.QueryParseContext.parseInnerQuery(QueryParseContext.java:223)
at
org.elasticsearch.index.query.IndexQueryParserService.parse(IndexQueryParserService.java:330)
at
org.elasticsearch.index.query.IndexQueryParserService.parse(IndexQueryParserService.java:260)
at
org.elasticsearch.search.query.QueryParseElement.parse(QueryParseElement.java:33)
at
org.elasticsearch.search.SearchService.parseSource(SearchService.java:622)
Any help would be appreciated.
Thanks
Srini
--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/16a38015-eaed-45af-9ad3-c474521b81a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.