On Mon, 2015-05-11 at 05:48 +0000, Abhishek Gupta wrote:
> According to this there are 137 records. Now I am faceting over these 137
> records with facet.method=fc. Ideally it should just iterate over these 137
> records and sub up the facets.

That is only the ideal method if you are not planning on issuing
subsequent calls: facet.method=fc does more work up front to ensure that
later calls are fast.

> http://localhost:9020/search/p1-umShard-1/select?q=*:*&;
> fq=(msgType:38+AND+snCreatedTime:[2015-04-15T00:00:00Z%20TO%20*])&
> facet.field=conversationId&facet=true&indent=on&wt=json&rows=0&
> facet.method=fc&debug=timing
> {
> 
>    - responseHeader:
>    {
>       - status: 0,
>       - QTime: 395103
>       },

[...]

> According to this faceting is taking 395036 time. Why its taking *395
> seconds* to just calculate facets of 137 records?

6½ minute is a long time, even for first call. Do you have tens to
hundreds of millions of documents in your index? Or do you have a
similiar amount of unique values in your facet?

Either way, subsequent faceting calls should be much faster and a switch
to DocValues should lower your first-call time significantly.

Toke Eskildsen, State and University Library, Denmark


Reply via email to