-
Type: Bug
-
Status: Open
-
Priority: Major
-
Resolution: Unresolved
-
Affects Version/s: 2023.10
-
Fix Version/s: None
-
Component/s: Core DBS, Core MongoDB
The database should not store empty multi-value properties. This causes issues with searches.
Replication Steps
- Create document in Web UI, and add a value for dc:subjects.
- Edit document and remove the value.
- Export JSON and see e.g.:
{ "path": "/config/UserWorkspaces/Administrator/null-1", "properties": { "dc:subjects": [ ], "dc:title": "null-1", }, "title": "null-1", "type": "File", "uid": "169d006e-52bd-4e71-858b-6f397a08a902" }
- Export bjson from database (MongoDB here):
> mongosh test> use nuxeo nuxeo> db.default.find({'ecm:id': '169d006e-52bd-4e71-858b-6f397a08a902'}) [ { _id: ObjectId("66d8570bc84cbc6f56e26713"), ... 'dc:subjects': [], ... } ]
- Search for document (using Web UI NXQL Admin Tool, i.e. against db):
SELECT * FROM File WHERE dc:title = 'null-1' AND dc:subjects IS NULL
- Expected result:
Found document: null-1
- Actual result:
No documents match the search criteria.
- Expected result:
Issue observed on 2023.7.9 and 2023.10.13
Note:
- This issue arises from a MV property that has had a value set and then removed. It does not affect properties that have never been set.