[Facet] No search result, but there was facet result


(Henry Jeong) #1

Hello there.

I have some question.
Is there a facet result when a result didn't have any document.
I'm testing on a facet function that i got a below result.
Is it possible?

I'm using 0.90.2 and testing terms_stats function.

{
"took": 64,
"timed_out": false,
"_shards": {
"total": 8,
"successful": 8,
"failed": 0
},
"hits": {
"total": 0,
"max_score": null,
"hits": []
},
"facets": {
"prdShopFacet": {
"_type": "terms_stats",
"missing": 0,
"terms": [
{
"term": "3327_174813_120427",
"count": 109,
"total_count": 109,
"min": 1,
"max": 1,
"total": 109,
"mean": 1
},
{
"term": "3327_174813",
"count": 109,
"total_count": 109,
"min": 1,
"max": 1,
"total": 109,
"mean": 1
},
{
"term": "3327_116443_738971",
"count": 109,
"total_count": 109,
"min": 1,
"max": 1,
"total": 109,
"mean": 1
},
{
"term": "3327_116443",
"count": 109,
"total_count": 109,
"min": 1,
"max": 1,
"total": 109,
"mean": 1
},
{
"term": "3327",
"count": 109,
"total_count": 109,
"min": 1,
"max": 1,
"total": 109,
"mean": 1
}
]
}
}
}

--
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.
For more options, visit https://groups.google.com/groups/opt_out.


(Ivan Brusic) #2

It depends on your query. If you have a top-level filter, then your
documents will get filtered, but your facets will be run on non-filtered
documents. Can you share your query?

Cheers,

Ivan

On Wed, Sep 4, 2013 at 12:36 AM, Henry sophistlv@gmail.com wrote:

Hello there.

I have some question.
Is there a facet result when a result didn't have any document.
I'm testing on a facet function that i got a below result.
Is it possible?

I'm using 0.90.2 and testing terms_stats function.

{
"took": 64,
"timed_out": false,
"_shards": {
"total": 8,
"successful": 8,
"failed": 0
},
"hits": {
"total": 0,
"max_score": null,
"hits": []
},
"facets": {
"prdShopFacet": {
"_type": "terms_stats",
"missing": 0,
"terms": [
{
"term": "3327_174813_120427",
"count": 109,
"total_count": 109,
"min": 1,
"max": 1,
"total": 109,
"mean": 1
},
{
"term": "3327_174813",
"count": 109,
"total_count": 109,
"min": 1,
"max": 1,
"total": 109,
"mean": 1
},
{
"term": "3327_116443_738971",
"count": 109,
"total_count": 109,
"min": 1,
"max": 1,
"total": 109,
"mean": 1
},
{
"term": "3327_116443",
"count": 109,
"total_count": 109,
"min": 1,
"max": 1,
"total": 109,
"mean": 1
},
{
"term": "3327",
"count": 109,
"total_count": 109,
"min": 1,
"max": 1,
"total": 109,
"mean": 1
}
]
}
}
}

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.


(system) #3