Hello,
In my project, we use nested object with different keys, for example,
the following messages are indexed
message1: {type: type1, nestedObj: {key1:value1, key2:
value2}}
message2: {type: type2, nestedObj: {key1:value3, key2:
value4, key3:value5}}
Maybe there are many different keys. Now we want to calculate how many
different key are used for each type. Eg. type1 contains key1 and key2.
type2 contains key1, key2 and key3.
How can I get this data? Although I can get the _mapping, but it
contains all of the keys used in nestedObject for all types. And I also
tried facet, it seems that my above requirement can't be met.
Is there any work around to solve this problem?
Appreciating your help!
在 2013年8月1日星期四UTC+8上午11时39分20秒,Leoncin写道:
Hello,
In my project, we use nested object with different keys, for example,
the following messages are indexed
message1: {type: type1, nestedObj: {key1:value1, key2:
value2}}
message2: {type: type2, nestedObj: {key1:value3, key2:
value4, key3:value5}}
Maybe there are many different keys. Now we want to calculate how many
different key are used for each type. Eg. type1 contains key1 and key2.
type2 contains key1, key2 and key3.
How can I get this data? Although I can get the _mapping, but it
contains all of the keys used in nestedObject for all types. And I also
tried facet, it seems that my above requirement can't be met.
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.