kolchfa-aws 75b1c94060
Add script score query (#4970)
* Add script score query

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Add copy buttons

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Add note about expensive queries

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Implemented tech review comments

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Rewording

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Rewording

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Apply suggestions from code review

Co-authored-by: Melissa Vagi <vagimeli@amazon.com>
Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>

* Update _query-dsl/specialized/script-score.md

Co-authored-by: Melissa Vagi <vagimeli@amazon.com>
Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Nathan Bower <nbower@amazon.com>
Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>

* More editorial comments and field name change

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

---------

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>
Co-authored-by: Melissa Vagi <vagimeli@amazon.com>
Co-authored-by: Nathan Bower <nbower@amazon.com>
2023-09-07 10:21:04 -04:00

26 lines
892 B
Markdown

---
layout: default
title: Specialized queries
has_children: true
nav_order: 65
has_toc: false
---
# Specialized queries
OpenSearch supports the following specialized queries:
- `distance_feature`: Calculates document scores based on the dynamically calculated distance between the origin and a document's `date`, `date_nanos`, or `geo_point` fields. This query can skip non-competitive hits.
- `more_like_this`: Finds documents similar to the provided text, document, or collection of documents.
- `percolate`: Finds queries (stored as documents) that match the provided document.
- `rank_feature`: Calculates scores based on the values of numeric features. This query can skip non-competitive hits.
- `script`: Uses a script as a filter.
- `script_score`: Calculates a custom score for matching documents using a script.
- `wrapper`: Accepts other queries as JSON or YAML strings.