Skip to content

declare aggregate as experimental #265

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions 040-SDK/111-search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -989,3 +989,8 @@ The parameter definitions are:
- `scale`: The duration at which distance from origin the score is decayed with factor, using an exponential function. It is formatted as number + unit of time, for example: `5d`, `20m`, `10s`.
- `decay`: The decay factor to expect at "scale" distance from the "origin".
- `factor`: The factor to multiply the decayed boost with.

## Known issues

Default values added to existing records by creating new columns with default values, are not available in Search.
These default values are available for new records and become accessible in existing records only in case of a subsequent record update.
15 changes: 13 additions & 2 deletions 040-SDK/120-aggregate.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ published: true
---

<Alert status="warning">
This feature is Beta. It is still under active development. While we are avoiding breaking changes, we do not
guarantee backwards compatibility until the functionality is GA.
Aggregations are experimental. While we are currently avoiding breaking changes, we do not guarantee backwards
compatibility or that this endpoint will reach GA without major changes.
</Alert>

The `/aggregate` API allows you to use the search/analytics engine to perform aggregations on your data. Similar to the [search API](/docs/sdk/search),
Expand Down Expand Up @@ -222,6 +222,8 @@ There are two types of aggregations:
- _bucket aggregations_, which split the data into buckets based on a column value. Examples of bucket aggregations are: `topValues`, `dateHistogram` and `numericHistogram`.
- _metric aggregations_, which compute a value based on the data in the bucket. Examples of metric aggregations are: `average`, `sum`, `min`, `max`, `count` and `uniqueCount`.

<Alert status="warning">Aggregations cannot be used with [link](/docs/concepts/data-model#link) columns.</Alert>

## Response type

The response for the example aggregation above has the following form:
Expand Down Expand Up @@ -426,6 +428,10 @@ results = xata.data().aggregate("titles", {

</TabbedCode>

<Alert status="warning">
The Date histogram aggregation cannot be used on xata metadata columns `xata.createdAt` and `xata.updatedAt`.
</Alert>

## Metric aggregations

### Count
Expand Down Expand Up @@ -839,3 +845,8 @@ For example:
}
}
```

## Known Issues

Default values added to existing records by creating new columns with default values, are not available for Aggregations.
These default values are available for new records and become accessible in existing records only in case of a subsequent record update.