Hello:
I got a problem in facet, for example I have person documents defined as
following
person = {
name:'personName1',
attributes:[
{
name:'attributeName1',
value:'attributeName1Value1'
},
{
name:'attributeName2',
value:'attributeName2Value1'
},
{
name:'attributeName3',
value:'attributeName3Value1'
}
]
}
each person contains one name and a list of attributes, and each attribute
contains name and value.
each attribute name e.g 'attributeName1' might have several possible values
'attrbuteName1Value1','attributeName1Value2',attributeName1Value3....
I have a lot of person documents combined with different attribute names
with different possible attribute values
I want to define a facet to query how many person in specific attribute name
e.g. how many persons with attribute name 'attributeName1'
the result would be:
facet = {
person_attributes_attribute_name_1:{
terms:[
{
"term":"attributeName1Value1",
"count":1000
},
{
"term":"attributeName1Value2",
"count":1300
},
{
"term":"attributeName1Value3",
"count":700
}
]
}
}
thanks
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/2a10f9b0-c8ad-42ae-80a2-914cfa32cfa5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.