Date fields not being returned in results

Hello, we have Elastic App Search via Elastic Cloud. Version 8.3.2

When we index documents with a Date field, that field does not appear in results and we cannot filter using that field.

Here is an example document indexed in the engine:

{
	"status": 10,
	"status_text": "In Progress",
	"ext_id": "QAC.20190820",
	"da_key": "QAC.20190820",
	"stage_name": null,
	"address": "22 Clark Road, Morayfield QLD 4506",
	"decision_date": "2021-02-02 06:57:41Z",
	"description": "1 into 23 lot residential subdivision",
	"applicants": [
	  "ABC Developments Pty Ltd"
	],
	"tags": null,
	"land_parcels": [
	  "1RP811523"
	],
	"location": "-27.126452, 152.956069",
	"record_id": 278,
	"id": "application-278",
	"record_type": "Application",
	"link": "charges-manager/applications/278"
}

Here is the result returned on search, no decision_date field:

{
	"address": {
		"raw": "22 Clark Road, Morayfield QLD 4506"
	},
	"applicants": {
		"raw": [
			"ABC Developments Pty Ltd"
		]
	},
	"link": {
		"raw": "charges-manager/applications/278"
	},
	"description": {
		"raw": "1 into 23 lot residential subdivision"
	},
	"record_type": {
		"raw": "Application"
	},
	"tags": {
		"raw": null
	},
	"record_id": {
		"raw": 278.0
	},
	"ext_id": {
		"raw": "QAC.20190820"
	},
	"da_key": {
		"raw": "QAC.20190820"
	},
	"stage_name": {
		"raw": null
	},
	"location": {
		"raw": "-27.126452, 152.956069"
	},
	"status_text": {
		"raw": "In Progress"
	},
	"_meta": {
		"id": "application-278",
		"engine": "np-local-search-np-lt-11-demo",
		"score": 6.594488
	},
	"id": {
		"raw": "application-278"
	},
	"land_parcels": {
		"raw": [
			"1RP811523"
		]
	},
	"status": {
		"raw": 10.0
	}
}

When I do a filter like this it returns 0 results:

"filters": {
        "decision_date": {
            "from": "2020-01-01 00:00:00Z",
            "to": "2023-01-01 00:00:00Z"
        }
    }

The field exists inside schema with correct type assigned

Can someone please help; what am I doing wrong here?

hi @Rav_Panchalingam !

Dates in App Search should be included in ISO 8601 format.

Can you please check that dates ingested with this format behave correctly?

Please let us know!

that worked, thank you

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.