Skip to content

Commit 914a54b

Browse files
aninibreaddaisyfaithauma
authored andcommitted
fix from modified date to timestamp (#21973)
1 parent 7fba2e7 commit 914a54b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/content/changelog/autorag/2025-04-23-autorag-metadata-filtering.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ products:
66
date: 2025-04-23T6:00:00Z
77
---
88

9-
You can now filter [AutoRAG](/autorag) search results by `folder` and `modified_date` using [metadata filtering](/autorag/configuration/metadata-filtering/) to narrow down the scope of your query.
9+
You can now filter [AutoRAG](/autorag) search results by `folder` and `timestamp` using [metadata filtering](/autorag/configuration/metadata-filtering/) to narrow down the scope of your query.
1010

1111
This makes it easy to build [multitenant experiences](/autorag/how-to/multitenancy/) where each user can only access their own data. By organizing your content into per-tenant folders and applying a `folder` filter at query time, you ensure that each tenant retrieves only their own documents.
1212

src/content/docs/autorag/configuration/metadata-filtering.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const answer = await env.AI.autorag("my-autorag").search({
2222
},
2323
{
2424
type: "gte",
25-
key: "modified_date",
25+
key: "timestamp",
2626
value: "1735689600000", // unix timestamp for 2025-01-01
2727
},
2828
],
@@ -32,15 +32,15 @@ const answer = await env.AI.autorag("my-autorag").search({
3232

3333
## Metadata attributes
3434

35-
You can currently filter by the `folder` and `modified_date` of an R2 object. Currently, custom metadata attributes are not supported.
35+
You can currently filter by the `folder` and `timestamp` of an R2 object. Currently, custom metadata attributes are not supported.
3636

3737
### `folder`
3838

3939
The directory to the object. For example, the `folder` of the object at `llama/logistics/llama-logistics.mdx` is `llama/logistics/`. Note that the `folder` does not include a leading `/`.
4040

4141
Note that `folder` filter only includes files exactly in that folder, so files in subdirectories are not included. For example, specifying `folder: "llama/"` will match files in `llama/` but does not match files in `llama/logistics`.
4242

43-
### `modified_date`
43+
### `timestamp`
4444

4545
The timestamp indicating when the object was last modified. Comparisons are supported using a 13-digit Unix timestamp (milliseconds), but values will be rounded to 10 digits (seconds). For example, `1735689600999` or `2025-01-01 00:00:00.999 UTC` will be rounded down to `1735689600000`, corresponding to `2025-01-01 00:00:00 UTC`.
4646

@@ -50,7 +50,7 @@ You can create simple comparison filters or an array of comparison filters using
5050

5151
### Comparison filter
5252

53-
You can compare a metadata attribute (for example, `folder` or `modified_date`) with a target value using a comparison filter.
53+
You can compare a metadata attribute (for example, `folder` or `timestamp`) with a target value using a comparison filter.
5454

5555
```js
5656
filters: {
@@ -102,7 +102,7 @@ You can see the metadata attributes of your retrieved data in the response under
102102
"filename": "llama/logistics/llama-logistics.md",
103103
"score": 0.45,
104104
"attributes": {
105-
"modified_date": 1735689600000, // unix timestamp for 2025-01-01
105+
"timestamp": 1735689600000, // unix timestamp for 2025-01-01
106106
"folder": "llama/logistics/",
107107
},
108108
"content": [

0 commit comments

Comments
 (0)