Sending query arguments within body of MLT API call. Query has no effect

I'm using the MLT API to get related documents. In other posts I've seen
you can supply additional params within the body of the call. Technically
I'm using PHP/Elastica, but I was able to track down the eventual curl call
being made:

http://search-add-es-a.dev.use1.nytimes.com:80/add/article/516bfb05ac02f560850017f1/_mlt?mlt_fields=body%2Cheadline&min_doc_frequency=1'
-d
'{
"from":0,
"size":30,
"query":
{"custom_filters_score":

{"filters":[{"filter":{"range":{"pub_date":{"from":"2012-01-01T0:00:00Z"}}},"boost":"1"}],
query":{"match_all":{}}
}
}
}'

What I'm trying to accomplish here is in addition to related documents
returned from MLT query, I want to boost certain articles that begin with a
certain date, as well as provide search from and search size fields. From
what I"ve seen, nothing actually happens. The query returns w/ no errors,
but I don't see any boosting, and I still get back my usual 10 results so
I'm thinking the 'query body' is not being respected. Is there an issue w/
my syntax or perhaps my version of elasticsearch (0.19.11)?

--
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.

Yes, the query body isn't respected. The search request body you can
specify with the mlt api is meant for providing anything but a query
(facet, top level filter, highlighting etc.). The query that is generated
by the mlt api is replaced by the query you specify in the request body.

On 16 April 2013 22:46, Marlo Epres mepres@gmail.com wrote:

I'm using the MLT API to get related documents. In other posts I've seen
you can supply additional params within the body of the call. Technically
I'm using PHP/Elastica, but I was able to track down the eventual curl call
being made:

http://search-add-es-a.dev.use1.nytimes.com:80/add/article/516bfb05ac02f560850017f1/_mlt?mlt_fields=body%2Cheadline&min_doc_frequency=1'
-d
'{
"from":0,
"size":30,
"query":
{"custom_filters_score":

{"filters":[{"filter":{"range":{"pub_date":{"from":"2012-01-01T0:00:00Z"}}},"boost":"1"}],
query":{"match_all":{}}
}
}
}'

What I'm trying to accomplish here is in addition to related documents
returned from MLT query, I want to boost certain articles that begin with a
certain date, as well as provide search from and search size fields. From
what I"ve seen, nothing actually happens. The query returns w/ no errors,
but I don't see any boosting, and I still get back my usual 10 results so
I'm thinking the 'query body' is not being respected. Is there an issue w/
my syntax or perhaps my version of elasticsearch (0.19.11)?

--
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.

--
Met vriendelijke groet,

Martijn van Groningen

--
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.