# DSL Query Framework

Hyperspace supports the following commands in a DSL queries

## Boolean Queries

* ['filter' clause](https://docs.hyper-space.io/hyperspace-docs/api-documentation/dsl-query-framework/bool-queries/filter-clause)
* ['must' clause](https://docs.hyper-space.io/hyperspace-docs/api-documentation/dsl-query-framework/bool-queries/must-clause)
* ['must\_not' clause](https://docs.hyper-space.io/hyperspace-docs/api-documentation/dsl-query-framework/bool-queries/must_not-clause)
* '[should' clause](https://docs.hyper-space.io/hyperspace-docs/api-documentation/dsl-query-framework/bool-queries/should-clause)
* ['should\_not' clause](https://docs.hyper-space.io/hyperspace-docs/api-documentation/dsl-query-framework/bool-queries/should_not-clause)

## Candidate Generation and Metadata Filtering

* ['geo\_distance ' ](https://docs.hyper-space.io/hyperspace-docs/api-documentation/dsl-query-framework/candidate-generation-and-metadata-filtering/geo-coordinates-match)
* '[range' ](https://docs.hyper-space.io/hyperspace-docs/api-documentation/dsl-query-framework/candidate-generation-and-metadata-filtering/range-match)
* ['term' ](https://docs.hyper-space.io/hyperspace-docs/api-documentation/dsl-query-framework/candidate-generation-and-metadata-filtering/term-match)
* '[Free text search](https://docs.hyper-space.io/hyperspace-docs/api-documentation/dsl-query-framework/bool-queries/free-text-search)'

## Scoring and Ranking

* [Boost](https://docs.hyper-space.io/hyperspace-docs/api-documentation/dsl-query-framework/scoring-and-ranking/boost)
* [dis\_max](https://docs.hyper-space.io/hyperspace-docs/api-documentation/dsl-query-framework/scoring-and-ranking/dis_max)
* [function\_score](https://docs.hyper-space.io/hyperspace-docs/api-documentation/dsl-query-framework/scoring-and-ranking/function-score)
* [Rarity Score (TF-IDF)](https://docs.hyper-space.io/hyperspace-docs/api-documentation/dsl-query-framework/scoring-and-ranking/rarity-score-tf-idf)

## Aggregations

* '[cardinality](https://docs.hyper-space.io/hyperspace-docs/api-documentation/dsl-query-framework/aggregations/cardinality-aggregation)'&#x20;
* '[date\_histogram](https://docs.hyper-space.io/hyperspace-docs/api-documentation/dsl-query-framework/aggregations/date-histogram)'
* [metric aggregations](https://docs.hyper-space.io/hyperspace-docs/api-documentation/dsl-query-framework/aggregations/metric-aggregations)
  * **sum** - Returns the sum of the field over the relevant candidates
  * **min** - Returns the min of the field over the relevant candidates
  * **max**  - Returns the max of the field over the relevant candidates
  * **avg**- Returns the average of the field over the relevant candidates
  * **count** - Returns the total number of valid field entries in the relevant candidates
  * **percentiles** - Returns the percentiles of the field over the relevant candidates.
* '[terms](https://docs.hyper-space.io/hyperspace-docs/api-documentation/dsl-query-framework/aggregations/terms-aggregation)'

## Data Management

* [Update by script](https://docs.hyper-space.io/hyperspace-docs/api-documentation/hyperspace-client/update_document)
* [Update by query](https://docs.hyper-space.io/hyperspace-docs/api-documentation/hyperspace-client/update_document)

### Coming Up

* Script Score
* Fuzzy Matching

Can't find the feature you are looking for?\
[Contact us!](mailto:undefined)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hyper-space.io/hyperspace-docs/api-documentation/dsl-query-framework.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
