mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-08-28 05:33:24 +00:00
docs(search): scope the relative-offset warning to a value standing alone
The warning said relative offsets such as "-1 week" "in practice mean no documents at all", unqualified, one bullet after the range-bound rule offered added:['-1 week' to now] as the example of quoting a bound. Both sentences were true in their own scope, but read together they talk a user out of a query that works: the bare value is a zero-width instant, the same offset as a bound is a real seven-day window (verified: lo=2026-06-08T12:00, hi=2026-06-15T12:00 from a frozen 2026-06-15T12:00). Also widens the last sentence to say now-3days and "3 days ago" are rejected wherever they appear, having checked they are rejected as range bounds too, single- or double-quoted, not only as bare values. Restores the 'added:"-1 week"' case to the standalone-forms list, which the docs name by that exact spelling, and pins the bound reading beside it so neither half of the warning is an unpinned claim. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
5ecd237a3d
commit
c56f910cc9
+1
-1
@@ -999,7 +999,7 @@ added:[2005-06-15T09:00:00Z to 2005-06-15T17:00:00Z]
|
||||
|
||||
!!! warning
|
||||
|
||||
`now`, `noon`, `midnight` and relative offsets such as `"-3 days"` or `"-1 week"` are accepted by the parser but resolve to a single instant rather than to a span of time, so they match only a document whose timestamp is exactly that instant, which in practice means no documents at all. Quoting does not change this. Spellings like `now-3days` and `"3 days ago"` are rejected outright.
|
||||
As a value on its own, `now`, `noon`, `midnight` and relative offsets such as `"-3 days"` or `"-1 week"` are accepted by the parser but resolve to a single instant rather than to a span of time, so they match only a document whose timestamp is exactly that instant, which in practice means no documents at all. Quoting does not change this. As a *range bound* they are the opposite of a trap and are what you want: `added:['-1 week' to now]` covers the whole of the last seven days. Spellings like `now-3days` and `"3 days ago"` are rejected outright wherever they appear.
|
||||
|
||||
#### Searching custom fields
|
||||
|
||||
|
||||
Reference in New Issue
Block a user