<commit_before>[[query-dsl-query-string-query]]
=== Query string query
++++
<titleabbrev>Query string</titleabbrev>
++++

Returns documents based on a provided query string, using a parser with a strict
syntax.

This query uses a <<query-string-syntax,syntax>> to parse and split the provided
query string based on operators, such as `AND` or `NOT`. The query
then <<analysis,analyzes>> each split text independently before returning
matching documents.

You can use the `query_string` query to create a complex search that includes
wildcard characters, searches across multiple fields, and more. While versatile,
the query is strict and returns an error if the query string includes any
invalid syntax.<commit_msg>[DOCS] Add search xref tip to `query_string` docs (#76728)<commit_after>[[query-dsl-query-string-query]]
=== Query string query
++++
<titleabbrev>Query string</titleabbrev>
++++

TIP: This page contains information about the `query_string` query type. For
information about running a search query in {es}, see <<search-your-data>>.

Returns documents based on a provided query string, using a parser with a strict
syntax.

This query uses a <<query-string-syntax,syntax>> to parse and split the provided
query string based on operators, such as `AND` or `NOT`. The query
then <<analysis,analyzes>> each split text independently before returning
matching documents.

You can use the `query_string` query to create a complex search that includes
wildcard characters, searches across multiple fields, and more. While versatile,
the query is strict and returns an error if the query string includes any
invalid syntax.
{'fraction_non_alphanumeric': 0.08041743400859423, 'fraction_numerical': 0.003069367710251688, 'mean_word_length': 5.392156862745098, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6641878', 'n_tokens_mistral': 428, 'n_tokens_neox': 402, 'n_words': 214}