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:
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)?
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.
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:
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)?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.