My point is that user has child unique, while unique also has his child report.
Then I used logstash mutate to add this join field:
mutate {
add_field => {
"levelStatus" => "user"
}
}
And first I post parent to elasticsearch , seems all fine.
But when I post child to it, it fails to index to ealsticsearch:
"reason"=>"failed to parse field [levelStatus] of type [text]"
So I went to kibana and found that the "levelStatus" field which I expected it as a join datatype actually is a string type.
Is there andthing wrong with my index_patterns or mutate scripts?
Hi, You means I should post to "_template/my_index-*"?
As I though, index_patterns and template are the same meaning.
Just as the _template will be remove in the furture,
Am I right?
A template is applied when you create a new index.
It helps to define which settings/mappings you would like to apply automatically when an index name matches the template.
I do not see parent-child relations used together with time-based indices very often as all documents related too each other must be located in the same shard (which is why routing is used). What is the rationale behind using parent-child here instead of e.g. flattening the model through denormalisation?
thanks for reply.
So what's diffrence with template(get _template/) and index_patterns(get index_patterns)?
I was though they are the same. Seems it is not.
Just like a usermanagement.
the top level will save userinfo, it is also the parent of the second level
the second level will save the devices did this user login. it is also the partent of the last level
the last level will record everthing the user had did in the devices.
The top level will update when user change the userinfo or new register.
the second level will update when action login disappeared
the lastest level will update more often, as the device will keep sending message to elastic.
So the docs inside top level and second level may will not update often, while docs of the latest level will increase fast(every message sended will treat as a new doc).
I once using "_template" , and elasticsearch noted me that "_template" will will no more use in the further version , and "index_patterns" will take the place of it?
I am not good at english, maybe I had make some understand mistake...
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.