mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-08-28 05:33:24 +00:00
refactor(search): delete the date-keyword-phrase pre-parse rewrite
whoosh-compat's grammar already accepts the closed multi-word date keyword vocabulary (previous month, this year, etc.) unquoted after a date field, making _quote_date_keyword_phrases redundant. Like its sibling rewrite removed in an earlier commit, it was not quote-aware and could insert quotes mid-phrase inside an unrelated quoted string (e.g. title:"see added:previous month notes"), corrupting the parse. Deleting it removes that hazard entirely. Docs are adjusted to scope the quoted-or-unquoted equivalence to the documented keyword list; other date expressions the grammar accepts (relative offsets, absolute dates) still require quoting. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
0fb36dae43
commit
7fddad849a
+5
-3
@@ -936,9 +936,11 @@ continues past where stemming cuts a word off cannot match at all:
|
||||
|
||||
Matching natural date keywords:
|
||||
|
||||
Multi-word date keywords work quoted or unquoted after a date field
|
||||
(`added:"previous month"` and `added:previous month` are equivalent);
|
||||
elsewhere in a query the same words are treated as ordinary search text.
|
||||
The multi-word date keywords listed below work quoted or unquoted after a
|
||||
date field (`added:"previous month"` and `added:previous month` are
|
||||
equivalent); elsewhere in a query the same words are treated as ordinary
|
||||
search text. Other date expressions the parser accepts (relative offsets
|
||||
like `-1 week`, or specific dates like `12 december 2019`) must be quoted.
|
||||
|
||||
```
|
||||
added:today
|
||||
|
||||
Reference in New Issue
Block a user