How can i find doc.values when i use terms_stats? (try again)


(이지홍) #1

request ...

{
"query": {
"field": {
"userId": "2254"
}
},
"facets": {
"runningTimeStat": {
"terms_stats": {
"key_field": "uniquePlayId",
"value_field": "scrubberPosition"
}
}
}
}

result response ...
facets: {
runningTimeStat: {
_type: terms_stats
missing: 0
terms: [
{
term:
count: 90
total_count: 90
min: 0
max: 290
total: 5474
mean: 60.82222222222222
}
{
term: b48f6180-9be4-498d-830a-6c324dd428e7
count: 38
total_count: 38
min: 0
max: 219
total: 5104
mean: 134.31578947368422
}
{
term: aa36a718-cf88-4f47-8ff3-ade231d784b9
count: 19
total_count: 19
min: 0
max: 353
total: 5047
mean: 265.63157894736844
}

my question-

doc is consist of various fields
e.g) uniquePlayId,userId,trackId, ....

i need a docs field values userID or trackId or and More
e.g )
term : aa36a718-cf88-4f47-8ff3-ade231d784b9
trackId :? //need this field value
userId : ? //need this field value
..other external field values //need..
how can i find trackId or userId values of term "aa36a718-cf88-4f47-8ff3-ade231d784b9"s?


(system) #2