Flowpack.ElasticSearch.ContentRepositoryAdaptor icon indicating copy to clipboard operation
Flowpack.ElasticSearch.ContentRepositoryAdaptor copied to clipboard

BUGFIX: Use multi_match instead of query_string

Open gerhard-boden opened this issue 5 years ago • 0 comments

By using multi_match instead of query_string within our search query, we prevent the accidental injection of Lucene search query strings. Currently an exception is thrown when adding " to your search query.

Using multi_match instead should lead to the same quality of results and is less prone to user errors, because in 99% of cases the search is used for classic search terms and no end user is expected to know the compact Lucene query string syntax.

see: https://www.elastic.co/guide/en/elasticsearch/reference/5.6/query-dsl-multi-match-query.html see: https://www.elastic.co/guide/en/elasticsearch/reference/5.6/query-dsl-query-string-query.html see: https://www.elastic.co/guide/en/elasticsearch/reference/5.6/query-dsl-query-string-query.html#query-string-syntax

gerhard-boden avatar Jun 25 '19 18:06 gerhard-boden