Issue in searching by _type in visualize tab

Hi,

I am having trouble using "_type" field in Kibana visualize tab. Basically I have below mapping configured.

{
	"aliases": {},
	"mappings": {
		"process-instance-activities": {
			"_meta": {
				"_version": "1.4.0"
			},
			"properties": {
				"activityId": {
					"type": "keyword"
				},
				"activityName": {
					"type": "text",
					"fields": {
						"_exact_name": {
							"type": "keyword"
						}
					}
				},
				"activityType": {
					"type": "keyword"
				},
				"behaviorClass": {
					"type": "keyword"
				},
				"duration": {
					"type": "long"
				},
				"endTime": {
					"type": "date"
				},
				"executionId": {
					"type": "keyword"
				},
				"historicActivityEntityId": {
					"type": "keyword"
				},
				"processDefinitionId": {
					"type": "keyword"
				},
				"processDefinitionKey": {
					"type": "keyword"
				},
				"processInstanceId": {
					"type": "keyword"
				},
				"startTime": {
					"type": "date"
				},
				"tenantId": {
					"type": "keyword"
				},
				"timeStamp": {
					"type": "date"
				},
				"userId": {
					"type": "keyword"
				}
			}
		},
		"completed-tasks": {
			"_meta": {
				"_version": "1.4.0"
			},
			"properties": {
				"assignee": {
					"type": "keyword"
				},
				"category": {
					"type": "keyword"
				},
				"createTime": {
					"type": "date"
				},
				"description": {
					"type": "text"
				},
				"dueDate": {
					"type": "date"
				},
				"duration": {
					"type": "long"
				},
				"executionId": {
					"type": "keyword"
				},
				"formKey": {
					"type": "keyword"
				},
				"id": {
					"type": "keyword"
				},
				"name": {
					"type": "text",
					"fields": {
						"_exact_name": {
							"type": "keyword"
						}
					}
				},
				"owner": {
					"type": "keyword"
				},
				"priority": {
					"type": "integer"
				},
				"processDefinitionId": {
					"type": "keyword"
				},
				"processDefinitionKey": {
					"type": "keyword"
				},
				"processInstanceId": {
					"type": "keyword"
				},
				"taskDefinitionKey": {
					"type": "keyword"
				},
				"tenantId": {
					"type": "keyword"
				},
				"timeStamp": {
					"type": "date"
				}
			}
		},
		"variables": {
			"_meta": {
				"_version": "1.4.0"
			},
			"properties": {
				"booleanValue": {
					"type": "boolean"
				},
				"createTime": {
					"type": "date"
				},
				"dateValue": {
					"type": "date"
				},
				"doubleValue": {
					"type": "double"
				},
				"executionId": {
					"type": "keyword"
				},
				"integerValue": {
					"type": "integer"
				},
				"json": {
					"type": "keyword"
				},
				"longValue": {
					"type": "long"
				},
				"name": {
					"type": "text",
					"fields": {
						"_exact_name": {
							"type": "keyword"
						}
					}
				},
				"processDefinitionId": {
					"type": "keyword"
				},
				"processDefinitionKey": {
					"type": "keyword"
				},
				"processInstanceId": {
					"type": "keyword"
				},
				"shortValue": {
					"type": "short"
				},
				"stringValue": {
					"type": "text",
					"fields": {
						"_exact_string_value": {
							"type": "keyword"
						}
					}
				},
				"taskId": {
					"type": "keyword"
				},
				"tenantId": {
					"type": "keyword"
				},
				"timeStamp": {
					"type": "date"
				},
				"userId": {
					"type": "keyword"
				},
				"uuidValue": {
					"type": "keyword"
				},
				"variableType": {
					"type": "keyword"
				}
			}
		},
		"process-instances": {
			"_meta": {
				"_version": "1.4.0"
			},
			"properties": {
				"businessKey": {
					"type": "keyword"
				},
				"createTime": {
					"type": "date"
				},
				"duration": {
					"type": "long"
				},
				"endTime": {
					"type": "date"
				},
				"id": {
					"type": "keyword"
				},
				"name": {
					"type": "text",
					"fields": {
						"_exact_name": {
							"type": "keyword"
						}
					}
				},
				"processDefinitionId": {
					"type": "keyword"
				},
				"processDefinitionKey": {
					"type": "keyword"
				},
				"tenantId": {
					"type": "keyword"
				},
				"timeStamp": {
					"type": "date"
				},
				"userId": {
					"type": "keyword"
				}
			}
		}
	},
	"settings": {
		"index": {
			"creation_date": "1544500290297",
			"number_of_shards": "5",
			"number_of_replicas": "1",
			"uuid": "2OH2298nQsWzguXMjSlpag",
			"version": {
				"created": "5060099"
			},
			"provided_name": "activiti_tenant_1"
		}
	}
}

From Kibana when I try to run query as "_type: process-instances" I am seeing results as shown below.

But when I run query as "_type: process-instance-activities", I am not seeing any results.

Other thing which I noticed on visualize tab is when I don't have any search criteria applied, I am not seeing "process-instance-activities" under "_type" field.

Also, when I execute direct Elasticsearch API "localhost:9200/activiti_tenant_1/process-instance-activities/_search?size=100" I am able to see json response with correct data.

Question here is though data is present under mapping why am I not able to search same from Kibana and use that to generate custom visualization.

Looking forward to your inputs, thank you in Advance.

Environment Details:
Elasticsearch: 5.6.0
Kibana: 5.6.0

Regards.

Hello Alf,

The hyphen is a reserved character in lucene query syntax, so you'd need to escape each usage with a backslash. See this page for guidance.

Thanks,
Aaron

Hi Aaron,

Thank you for response. I tried escaping '-' hyphen as you suggested but I am still not able to get data. Please see my below query:
**_type:process\-instance\-activities**

Under same index I have other mapping (refer json shared in main ticket) which also has '-' hyphen in "_type" property, but I am able to search without escaping hyphen. see below query...
**type:process-instances**

Regards.

Hi,

Other thing which I wanted to share here is, when I try to search for same mapping from Kibana > Dev Tools, I am able to search and get results. Please refer below screenshot.

Still I am not sure how Do i search for "process-instance-activities" _type from Kibana Discover? Any inputs is really appreciated.

Also, when I navigate to Kibana > Discover page without any search criteria, I see "_type" is present under "Available fields". But when I click on that field, it shows me only 3 mapping values (ie...1: process-instances, completed-tasks, variables). Not sure what is going on behind the scene. I was expecting to see all 4 mappings under this field.

Regards.

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