Can I accomplish this facet with my data structure?


(Jason Fill) #1

I have provided a sample record below and I want to see if based on this
data, I can output the facet I am looking for.

{
user: {
name: "bob",
metadata: [
{
questionid: 448
parameterid: cid
response: 71668
},
{
questionid: 449
parameterid: dc
response: AP100
},
{
questionid: 450
parameterid: cc
response: GHUE
}
]
}
}

I am looking to create a facet that will tell me the number of occurrences
for the responses based on the paramterid groups. So for example:

CID
71668 (3)

DC
AP100 (2)

CC
DHUE (3)

The numbers in the parenthesis indicate a sample of how many of each were
found - these of course are made up numbers.

So basically, I want to ensure I group each of the responses by the
parameterid. So for example if GHUE actually appeared under the "dc"
parameterid, it would be counted under that group and we would see a DHUE
under each cc and dc.

I hope that makes sense.

Thanks in advance.

Jason

--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/3dcd0777-e309-4e23-95b1-04a29c77fe7d%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Brian Yoder) #2

Jason,

Perhaps this might describe what you're looking for. It's based on ES
version 0.90.X:

https://groups.google.com/d/msg/elasticsearch/p4i3GvGDoUs/NFZat2BNj-wJ

I don't know what's in store for ES 1.X that might implement this.

I hope this helps you!

Brian

--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/a6880cd4-e3b4-4a0a-87e1-fea8f305b10a%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(system) #3