mirror of
https://github.com/iSharkFly-Docs/opensearch-docs-cn
synced 2025-02-09 23:24:41 +00:00
* Add new Query DSL section Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Change config settings Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Fix links Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Add Query DSL back to Search Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Fix remaining links Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Last reorder Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Add Heather's feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Add Query DSL section. Delete Index Data page Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Fix index title Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Add correct title to managing indexes Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Change config yml Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Add permalinks for each page in query DSL section Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * :wq --------- Signed-off-by: Naarcha-AWS <naarcha@amazon.com>
25 lines
1.7 KiB
Markdown
25 lines
1.7 KiB
Markdown
---
|
|
layout: default
|
|
title: Span queries
|
|
parent: Query DSL
|
|
nav_order: 60
|
|
permalink: /query-dsl/span-query/
|
|
redirect_from:
|
|
- /opensearch/query-dsl/span-query/
|
|
---
|
|
|
|
# Span queries
|
|
|
|
You can use span queries to perform precise positional searches. Span queries are low-level, specific queries that provide control over the order and proximity of specified query terms. They are primarily used to search legal documents and patents.
|
|
|
|
Span queries include the following query types:
|
|
|
|
- **Span containing**: Wraps a list of span queries and only returns spans that match a second span query.
|
|
- **Span field masking**: Combines `span_near` or `span_or` across different fields.
|
|
- **Span first**: Matches spans close to the beginning of the field.
|
|
- **Span multi-term**: Provides a wrapper around the following query types: `term`, `range`, `prefix`, `wildcard`, `regexp` or `fuzzy`.
|
|
- **Span near**: Matches spans that are near each other. Wraps multiple span queries that must match within the specified `slop` distance of each other, and optionally in the same order. Slop represents the maximum number of intervening unmatched positions and indicates whether matches are required to be returned in order.
|
|
- **Span not**: Provides a wrapper for another span query and excludes any documents that match the internal query.
|
|
- **Span or**: Provides a wrapper for multiple span queries and includes any documents that match any of the specified queries.
|
|
- **Span term**: Functions in the same way as a `term` query, but is designed to be used with other span queries.
|
|
- **Span within**: Used with other span queries to return a single span query if its span is within the spans that are returned by a list of other span queries. |