Bad performance for terms facet on no hits result

Hi All,

My elasticsearch version is 1.1.1. I have a 20 shards and 0 replica index
having 4m docs.

It is fast (1ms) for my query.

{

  • took: 1
  • timed_out: false
  • _shards: {
    • total: 20
    • successful: 20
    • failed: 0
      }
  • hits: {
    • total: 0
    • max_score: null
    • hits: [ ]
      }

}

We do the query with terms facet on a high cardinality field 'a'. The query
result is 0 hit and I assume it should be fast enough to calculate the
terms facet(should be 0 term).

But when I fetching the terms from 0 hits, I got this
{

  • took: 46
  • timed_out: false
  • _shards: {
    • total: 20
    • successful: 20
    • failed: 0
      }
  • hits: {
    • total: 0
    • max_score: null
    • hits: [ ]
      }
  • facets: {
    • fc: a: {
      • _type: terms
      • missing: 0
      • total: 0
      • other: 0
      • terms: [ ]
        }
        }

}
, which took much more than 1ms for the terms facet.

May I know is the terms facet not applied on the result hits only?

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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/2531388f-674a-4a9f-8f93-e6bb57b2c593%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Is this a repeated test? There might be some cache loading going on during
the first request. Values must be loaded into the cache before they can be
filtered on. Try a repeated test.

--
Ivan

On Mon, May 26, 2014 at 11:12 PM, Hui dannyhui1103@gmail.com wrote:

Hi All,

My elasticsearch version is 1.1.1. I have a 20 shards and 0 replica index
having 4m docs.

It is fast (1ms) for my query.

{

  • took: 1
  • timed_out: false
  • _shards: {
    • total: 20
    • successful: 20
    • failed: 0
      }
  • hits: {
    • total: 0
    • max_score: null
    • hits:
      }

}

We do the query with terms facet on a high cardinality field 'a'. The
query result is 0 hit and I assume it should be fast enough to calculate
the terms facet(should be 0 term).

But when I fetching the terms from 0 hits, I got this
{

  • took: 46
  • timed_out: false
  • _shards: {
    • total: 20
    • successful: 20
    • failed: 0
      }
  • hits: {
    • total: 0
    • max_score: null
    • hits:
      }
  • facets: {
    • fc: a: {
      • _type: terms
      • missing: 0
      • total: 0
      • other: 0
      • terms:
        }
        }

}
, which took much more than 1ms for the terms facet.

May I know is the terms facet not applied on the result hits only?

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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/2531388f-674a-4a9f-8f93-e6bb57b2c593%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/2531388f-674a-4a9f-8f93-e6bb57b2c593%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
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/CALY%3DcQDuP-KGPbr5FiCf8C2V%2B%2BgG4EUjesMD%3Dvk1K0MZookEMQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.