Index field not being returned in "returnedFields" option in Search query -- cannot get statusCode nor trace msg
Summary
Information about the status of indexing on a record is being created and kept in the Elastic index, but currently the value of that information is not directly accessible since it is not being returned in the "returnedFields" block when requested.
Details
A standard query to return the "index" block is:
{
"kind": ":::",
"limit": 100,
"query": "index.statusCode:[399 TO 599]",
"returnedFields": ["index", "id", "kind"]
}
This should return a response with only "id", "kind", and "index" for those records with a response code in the given range. In the current implementation on Azure at least (may be common code...not checked), the query is honored in that only records that match the index assertion are returned, but the index block is not.
Example
Expected type of response to the above query:
{
"results": [
{
"kind": "common:anp:block:1.0.0",
"index": {
"trace": [
"schema not found"
],
"statusCode": 404,
"lastUpdateTime": "2020-07-06T10:27:20.655Z"
},
"id": "common:anp_block:3071854054914639"
}
Whereas the current impl on Azure returns:
{
"results": [
{
"kind": "common:anp:block:1.0.0",
"index": {
"trace": [
"schema not found"
],
"statusCode": 404,
"lastUpdateTime": "2020-07-06T10:27:20.655Z"
},
"id": "common:anp_block:3071854054914639"
}
Key info in the "index" block is therefore not available.