As I want to perform MLT query with doc id in my hand, I have two questions.
Is it possible to perform MLT query by passing just a docID in case
where the _source is disabled? Reason is my document size will be large, so
I don't feel it feasible either to send a like_text or enabling _source as
both can explode the memory requirements.
How can I apply a filter on the MLT request from Java API?
yes, you can use the fields parameter to use mlt without an enabled
_source. Only if you do not provide fields, mlt is falling back to use
_source
mlt filter is not implemented at the moment, but it seems possible by
introducing a filter parameter to the mlt action
Cheers,
Jörg
On Friday, November 16, 2012 9:52:51 AM UTC+1, Atharva Patel wrote:
As I want to perform MLT query with doc id in my hand, I have two
questions.
Is it possible to perform MLT query by passing just a docID in case
where the _source is disabled? Reason is my document size will be large, so
I don't feel it feasible either to send a like_text or enabling _source as
both can explode the memory requirements.
How can I apply a filter on the MLT request from Java API?
When I try out performing MTL query using MLT API http://goo.gl/oEwFH, it
gives me error:
{"error":"ElasticSearchException[No fields found to fetch the 'likeText'
from]","status":500}
Am I missing something? I would like to highlight that I am neither storing
the fields or enabling _source. Is it still possible to perform MLT query
with that docID? How? I have mentioned the fields 'analyzed'. Do I need to
do anything else also?
On Monday, 19 November 2012 05:55:33 UTC+5:30, Jörg Prante wrote:
yes, you can use the fields parameter to use mlt without an enabled
_source. Only if you do not provide fields, mlt is falling back to use
_source
mlt filter is not implemented at the moment, but it seems possible by
introducing a filter parameter to the mlt action
Cheers,
Jörg
On Friday, November 16, 2012 9:52:51 AM UTC+1, Atharva Patel wrote:
As I want to perform MLT query with doc id in my hand, I have two
questions.
Is it possible to perform MLT query by passing just a docID in case
where the _source is disabled? Reason is my document size will be large, so
I don't feel it feasible either to send a like_text or enabling _source as
both can explode the memory requirements.
How can I apply a filter on the MLT request from Java API?
if you don't have fields stored, and no _source is enabled, you are out of
luck. MoreLikeThis works by executing two actions: first, a get request on
the given document, fetching a stored field content for the likeText search
query (falling ack to _source if no fields are specified), then populating
the parameters before executing a generated search as the second action.
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.