elasticsearch/elasticsearch — pull request #3291 by jpountz (2013-07-04 08:25:47+00:00)
Title: Ignore numeric fields from more-like-this and fuzzy-like-this queries.

More-like-this and fuzzy-like-this queries expect analyzers which are able to
generate character terms (CharTermAttribute), so unfortunately this doesn't
work with analyzers which generate binary-only terms (BinaryTermAttribute,
the default CharTermAttribute impl being a special BinaryTermAttribute) such as
our analyzers for numeric fields (byte, short, integer, long, float, double but
also date and ip).

To work around this issue, this patch ignores numeric fields when parsing the
DSL for more-like-this and fuzzy-like-this queries:
- if the query only targets numeric fields, then it will return no result,
- if the query targets both string and numeric fields, the numeric fields will
be ignored.

Close #3252