Search through tags with more like this query

Hi everyone,

I have a question regarding the more like this query Currently, I'm making
a solution to match "more like this" product based on its tags.id . I have
the _mapping of product which is something like this :

{
name(:string),
tags: [ {id(:integer}, {id(:integer)} ]
}

I have tried something like this :
elasticsearch:9200/<index_name>/product/_mlt?mlt_fields=tags.id but it
doesn't seem to work. I got the error :
{"error":"NumberFormatException[For input string: "[67773, 71354, 68265,
70599, 81670, 191917]"]","status":500}

Elasticsearch doesn't work automagically which is great. But I'm not clear
what is problem I have and what is a good way to solve this problem.

Thanks for reading.

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

Hey,

not sure on the top of my head, but I think, MLT queries need an analyzer,
which creates char terms - where as numeric analyzers in lucene do not.
This is the reason why MLT does not work with numbers. In your case a
workaround might be easy, by just indexing the real tagnames and search for
documents with the same tag (maybe you do not need MLT then).

If you want to know more, see

--Alex

On Wed, Oct 16, 2013 at 9:43 AM, Quang Dũng nxqd.inbox@gmail.com wrote:

Hi everyone,

I have a question regarding the more like this query Currently, I'm making
a solution to match "more like this" product based on its tags.id . I
have the _mapping of product which is something like this :

{
name(:string),
tags: [ {id(:integer}, {id(:integer)} ]
}

I have tried something like this :
elasticsearch:9200/<index_**name>/product/_mlt?mlt_fields=**tags.idhttp://tags.id/ but
it doesn't seem to work. I got the error :
{"error":"**NumberFormatException[For input string: "[67773, 71354,
68265, 70599, 81670, 191917]"]","status":500}

Elasticsearch doesn't work automagically which is great. But I'm not clear
what is problem I have and what is a good way to solve this problem.

Thanks for reading.

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

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