elasticsearch java client sample (version 5.5.3)
Simple Java application to process basic functionalities (Create Index, Indexing documents, Simple Query) and Parent-Chiild relationship of ElasticSearch. Furthemore it uses TcpTransport client (After ES 7.0v ES considering to remove TcpTransport client, so I recommend to use Hight rest client instead.)
pom.xml
to install maven dependencies.Queries and data samples
PUT my_index
{
"settings" : {
"index" : {
"number_of_shards" : 1,
"number_of_replicas" : 0
}
},
"mappings": {
"tpin": {},
"spin": {
"_parent": {
"type": "tpin"
}
}
}
}