mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-24 23:27:25 -04:00
This PR introduces a new query called `combined_fields` for searching multiple text fields. It takes a term-centric view, first analyzing the query string into individual terms, then searching for each term any of the fields as though they were one combined field. It is based on Lucene's `CombinedFieldQuery`, which takes a principled approach to scoring based on the BM25F formula. This query provides an alternative to the `cross_fields` `multi_match` mode. It has simpler behavior and a more robust approach to scoring. Addresses #41106.
60 lines
2.1 KiB
Text
60 lines
2.1 KiB
Text
[[full-text-queries]]
|
|
== Full text queries
|
|
|
|
The full text queries enable you to search <<analysis,analyzed text fields>> such as the
|
|
body of an email. The query string is processed using the same analyzer that was applied to
|
|
the field during indexing.
|
|
|
|
The queries in this group are:
|
|
|
|
<<query-dsl-intervals-query,`intervals` query>>::
|
|
A full text query that allows fine-grained control of the ordering and
|
|
proximity of matching terms.
|
|
|
|
<<query-dsl-match-query,`match` query>>::
|
|
The standard query for performing full text queries, including fuzzy matching
|
|
and phrase or proximity queries.
|
|
|
|
<<query-dsl-match-bool-prefix-query,`match_bool_prefix` query>>::
|
|
Creates a `bool` query that matches each term as a `term` query, except for
|
|
the last term, which is matched as a `prefix` query
|
|
|
|
<<query-dsl-match-query-phrase,`match_phrase` query>>::
|
|
Like the `match` query but used for matching exact phrases or word proximity matches.
|
|
|
|
<<query-dsl-match-query-phrase-prefix,`match_phrase_prefix` query>>::
|
|
Like the `match_phrase` query, but does a wildcard search on the final word.
|
|
|
|
<<query-dsl-multi-match-query,`multi_match` query>>::
|
|
The multi-field version of the `match` query.
|
|
|
|
<<query-dsl-combined-fields-query,`combined_fields` query>>::
|
|
Matches over multiple fields as if they had been indexed into one combined field.
|
|
|
|
<<query-dsl-query-string-query,`query_string` query>>::
|
|
Supports the compact Lucene <<query-string-syntax,query string syntax>>,
|
|
allowing you to specify AND|OR|NOT conditions and multi-field search
|
|
within a single query string. For expert users only.
|
|
|
|
<<query-dsl-simple-query-string-query,`simple_query_string` query>>::
|
|
A simpler, more robust version of the `query_string` syntax suitable
|
|
for exposing directly to users.
|
|
|
|
|
|
include::intervals-query.asciidoc[]
|
|
|
|
include::match-query.asciidoc[]
|
|
|
|
include::match-bool-prefix-query.asciidoc[]
|
|
|
|
include::match-phrase-query.asciidoc[]
|
|
|
|
include::match-phrase-prefix-query.asciidoc[]
|
|
|
|
include::combined-fields-query.asciidoc[]
|
|
|
|
include::multi-match-query.asciidoc[]
|
|
|
|
include::query-string-query.asciidoc[]
|
|
|
|
include::simple-query-string-query.asciidoc[]
|