Multi-field, multi-word, match without query_string

后端 未结 4 1579
清酒与你
清酒与你 2020-12-23 21:58

I would like to be able to match a multi word search against multiple fields where every word searched is contained in any of the fields, any combination. T

4条回答
  •  无人及你
    2020-12-23 22:51

    I would rather avoid using query_string in case the user passes "OR", "AND" and any of the other advanced params.

    In my experience, escaping the special characters with backslash is a simple and effective solution. The list can be found in the documentation http://lucene.apache.org/core/4_5_0/queryparser/org/apache/lucene/queryparser/classic/package-summary.html#package_description, plus AND/OR/NOT/TO.

提交回复
热议问题