Trying to boost by date

I'm trying to boost my articles based on the post_date field in the index.
I've followed along this tutorialhttp://jontai.me/blog/2013/01/advanced-scoring-in-elasticsearch/as best I could but I'm running into some issues. When I execute the following
curl https://gist.github.com/greatwitenorth/144507f760bbe3a311a6 it gives
me this error:
nested: QueryParsingException[[spna] [custom_filters_score] query does not
support [query]];

So I thought, OK I'll remove query from custom_filters_score but when I do
that I get this error:
nested: QueryParsingException[[spna] [custom_filters_score] requires
'query' field];

I'm not really sue what to do here. I'm guessing it's a formatting error in
my curl statement. But these error messages are kind of contradicting each
other.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

OK I think I found my syntax error. I've passed in a query_string into
query. But now the issue is with the script. I'm getting an error:
"error" : "CompileException[[Error: No field found for
[org.elasticsearch.index.fielddata.ScriptDocValues$Longs@359abca] in
mapping with types [post]]\n[Near : {... *pow(10,-11)) * abs(now -
doc[post_date].date.getM ....}]\n ^\n[Line:
1, Column: 35]]; nested: ElasticSearchIllegalArgumentException[No field
found for [org.elasticsearch.index.fielddata.ScriptDocValues$Longs@359abca]
in mapping with types [post]]; ",

Here is the curl I'm using now:

Here is the mappings for the index:
{
"spna" : {
"post" : {
"properties" : {
"category" : {
"type" : "string"
},
"post_author" : {
"type" : "string"
},
"post_content" : {
"type" : "string"
},
"post_date" : {
"type" : "date",
"format" : "YYYY-MM-dd HH:mm:ss"
},
"post_tag" : {
"type" : "string"
},
"post_title" : {
"type" : "string"
}
}
},
"page" : {
"properties" : {
"post_author" : {
"type" : "string"
},
"post_content" : {
"type" : "string"
},
"post_date" : {
"type" : "date",
"format" : "YYYY-MM-dd HH:mm:ss"
},
"post_title" : {
"type" : "string"
}
}
}
}
}

On Wednesday, June 12, 2013 12:29:01 PM UTC-5, Nick Verwymeren wrote:

I'm trying to boost my articles based on the post_date field in the index.
I've followed along this tutorialhttp://jontai.me/blog/2013/01/advanced-scoring-in-elasticsearch/as best I could but I'm running into some issues. When I execute the following
curl https://gist.github.com/greatwitenorth/144507f760bbe3a311a6 it
gives me this error:
nested: QueryParsingException[[spna] [custom_filters_score] query does not
support [query]];

So I thought, OK I'll remove query from custom_filters_score but when I do
that I get this error:
nested: QueryParsingException[[spna] [custom_filters_score] requires
'query' field];

I'm not really sue what to do here. I'm guessing it's a formatting error
in my curl statement. But these error messages are kind
of contradicting each other.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.