Full text search index with a datetime child field giving 0 results

Hi,
We are using the couchbase server to save vehicle documents with a vehicle number, location details, vehicle type, and location updated date time. Following is a vehicle document,
{
“vehicleXid”: “x1”,
“bearing”: 0,
“accountXid”: “x1”,
“vehicleNumber”: “SED-1111”,
“location”: {
“lon”: 80.341111,
“lat”: 7.241011
},
“currentTimeStamp”: “Jan 19, 2021 6:00:54 AM”,
“vehicleType”: “CAR”,
“taxiTypes”: [
“SEDAN”
],
“speed”: 0,
“vehicleStatus”: “OFFLINE”
}

And Following is the taxi search index we are using,

{
“type”: “fulltext-index”,
“name”: “local-taxi-serach-index”,
“uuid”: “765acea0a1ecff1c”,
“sourceType”: “couchbase”,
“sourceName”: “local-taxi-bucket”,
“sourceUUID”: “ff9b15e2bfab6f69f2d803bc28e17eec”,
“planParams”: {
“maxPartitionsPerPIndex”: 171,
“indexPartitions”: 6
},
“params”: {
“doc_config”: {
“docid_prefix_delim”: “::”,
“docid_regexp”: “”,
“mode”: “docid_prefix”,
“type_field”: “type”
},
“mapping”: {
“analysis”: {
“date_time_parsers”: {
“c_timestamp”: {
“layouts”: [
“2021-01-12T03:59:10.429Z”
],
“type”: “flexiblego”
}
}
},
“default_analyzer”: “standard”,
“default_datetime_parser”: “dateTimeOptional”,
“default_field”: “_all”,
“default_mapping”: {
“dynamic”: true,
“enabled”: false
},
“default_type”: “_default”,
“docvalues_dynamic”: true,
“index_dynamic”: true,
“store_dynamic”: false,
“type_field”: “_type”,
“types”: {
“vehicle”: {
“dynamic”: false,
“enabled”: true,
“properties”: {
“currentTimeStamp”: {
“dynamic”: false,
“enabled”: true,
“fields”: [
{
“date_format”: “c_timestamp”,
“include_in_all”: true,
“include_term_vectors”: true,
“index”: true,
“name”: “currentTimeStamp”,
“type”: “datetime”
}
]
},
“location”: {
“dynamic”: false,
“enabled”: true,
“fields”: [
{
“docvalues”: true,
“include_in_all”: true,
“include_term_vectors”: true,
“index”: true,
“name”: “location”,
“type”: “geopoint”
}
]
},
“taxiTypes”: {
“dynamic”: false,
“enabled”: true,
“fields”: [
{
“include_in_all”: true,
“index”: true,
“name”: “taxiTypes”,
“type”: “text”
}
]
},
“vehicleStatus”: {
“dynamic”: false,
“enabled”: true,
“fields”: [
{
“include_in_all”: true,
“index”: true,
“name”: “vehicleStatus”,
“type”: “text”
}
]
},
“vehicleType”: {
“dynamic”: false,
“enabled”: true,
“fields”: [
{
“include_in_all”: true,
“index”: true,
“name”: “vehicleType”,
“type”: “text”
}
]
}
}
}
}
},
“store”: {
“indexType”: “scorch”
}
},
“sourceParams”: {}
}

It gives the empty set as the results. But without the datetime child field ,it returns the vehicles. Is there an issue with the search index we are using?

@Prageesha_H,

Blockquote
It gives the empty set as the results.

Can you plz share the details of the query tried here?

Looks like the date-time layout specified in the index definition isn’t matching the actual date-time format present in the sample document.

We saved the datetime value with the same format. Now it is working.Thank you.