elastic / elasticsearch

Free and Open Source, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
1.19k stars 24.84k forks source link

[DOCS] "Escape" flag for "query_string" is not documented #77604

Open Ronserruya opened 3 years ago

Ronserruya commented 3 years ago

Following a question on StackOverflow: https://stackoverflow.com/questions/69149461/what-is-escape-property-in-query-string-in-elasticsearch

The "escape" flag for query_string is not documented, and it's unclear what it does exactly https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html

As far as I understand, according to the source code https://github.com/elastic/elasticsearch/blob/bb9c91fc5729d1fa474e249318634971c57d3f74/server/src/main/java/org/elasticsearch/index/query/QueryStringQueryBuilder.java#L824

Es calls https://lucene.apache.org/core/6_6_2/queryparser/org/apache/lucene/queryparser/classic/QueryParserBase.html#escape-java.lang.String-

To escape the string

I verified that the flag itself is accepted on ES 7.3 and 7.14 (although Kibana doesn't autocomplete it, but maybe this is a separate issue)

elasticmachine commented 3 years ago

Pinging @elastic/es-search (Team:Search)

elasticmachine commented 3 years ago

Pinging @elastic/es-docs (Team:Docs)

elasticsearchmachine commented 4 months ago

Pinging @elastic/es-search-relevance (Team:Search Relevance)