Index in elasticsearch have dynamic feilds
For example I have following mapping
"Person_ID": {
"type": "string"
},
"First_name": {
"type": "string"
},
"last_name": {
"type": "string"
}
Some documents have last_name , Some documents doesn't have last name
When I query from Hive last_name is always returned as null for every document
Hive external table defination is
CREATE EXTERNAL TABLE elasticsearch ( Person_ID STRING, First_name String , last_name String)
STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler'
TBLPROPERTIES('es.nodes' = '123.456.789.111', 'es.port' = '9200', 'es.resource' = 'person/data','es.query' = '?q=*');
Any help will be appreciated