Index problem - Built in date filter not working

When things don't work as they should.
Post Reply
fgdutoit
Posts: 1
Joined: Sat May 23, 2020 9:23 am

Index problem - Built in date filter not working

Post by fgdutoit »

I have a metadata type set up as follow:
{
"default": null,
"id": 4,
"label": "Date of Service",
"lookup": "",
"name": "DateofService",
"parser": "mayan.apps.metadata.parsers.DateParser",
"url": "http://10.165.35.11:8034/api/metadata_types/4/",
"validation": ""
}
I'm trying to create and index on the metadata type set up as follow:
"label": "Service date",
"node_templates": [
{
"enabled": true,
"expression": "",
"id": 10,
"index": 4,
"level": 0,
"link_documents": false,
"parent": null
},
{
"enabled": true,
"expression": "{{ document.metadata_value_of.DateofService|date:\"Y\"}}",
"id": 11,
"index": 4,
"level": 1,
"link_documents": false,
"parent": 10
}

Expected result: Index level according to year part of date of service metadata value.
Actual result: 0 documents indexed.

Where is my error?

Post Reply