jprante / elasticsearch-analysis-decompound

Decompounding Plugin for Elasticsearch
GNU General Public License v2.0
87 stars 38 forks source link

Respect "and" operator from match query when using only_subwords #19

Closed AndreKR closed 8 years ago

AndreKR commented 8 years ago

A match query with operator "and" involving a decompounded word (e.g. "viel kunststoff") was interpreted as "+viel +(kunst stoff)". This is most likely not the desired result, as "kunst" and "stoff" are not synonyms but both have to occur. This commit changes this behavior to be "+viel +kunst +stoff".

This solves issue #11.

This doesn't changes the behavior for only_subwords: false because the use case for that (and therefore the desired behavior) is unclear to me.

jprante commented 8 years ago

Thanks - good catch!