Add NumericRestrictionNode to the KQL PEG grammar so that range
operators work with numeric values, not just DateTimes. This enables
queries like `size>=1048576`, `photo.iso>=100`, `photo.fNumber>=2.8`,
and `photo.focalLength<50`.
Changes:
- ast: add NumericNode with Key, Operator, Value (float64)
- kql/dictionary.peg: add NumericRestrictionNode and Number rules
- kql/factory.go: add buildNumericNode()
- kql/cast.go: add toFloat64()
- bleve/compiler.go: compile NumericNode to NumericRangeQuery
Fixes: #12093
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This change enables photo gallery applications to access EXIF metadata
through the search API.
Changes:
- Add KQL query support for photo fields:
- photo.takenDateTime (datetime range queries)
- photo.cameraMake, photo.cameraModel (keyword queries)
- photo.fNumber, photo.focalLength, photo.iso (numeric queries)
- Configure Bleve index to store photo fields (Store=true)
- Map photo metadata from Bleve hits to Entity.Photo protobuf
- Add oc:photo-* properties to WebDAV search responses
- Add unit tests for photo field queries
The photo metadata is extracted by Tika during indexing and stored
in the Bleve search index. This enables queries like:
photo.takenDateTime:[2023-01-01 TO 2023-12-31]
photo.cameraMake:Canon
Signed-off-by: Paul Faure <paul@faure.ca>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>