lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mikhail Ibraheem <mikhail.ibrah...@oracle.com>
Subject RE: JSON facet performance for aggregations
Date Sun, 30 Apr 2017 08:11:05 GMT
Hi Vijay,
It is already numeric field.
It is huge difference between json and flat here. Do you know the reason for this? Is there
a way to improve it ?

-----Original Message-----
From: Vijay Tiwary [mailto:vijaykr.tiwary@gmail.com] 
Sent: Sunday, April 30, 2017 9:58 AM
To: solr-user@lucene.apache.org
Subject: Re: JSON facet performance for aggregations

Json facet on string fields run lot slower than on numeric fields. Try and see if you can
represent studentid as a numeric field.

On Apr 30, 2017 1:19 PM, "Mikhail Ibraheem" <mikhail.ibraheem@oracle.com>
wrote:

> Hi,
>
> I am trying to do aggregation with JSON faceting but performance is 
> very bad for one of the requests:
>
> json.facet={
>
>    studentId:{
>
>       type:terms,
>
>       limit:-1,
>
>       field:"studentId",
>
>                   facet:{
>
>                   x:"sum(grades)"
>
>                   }
>
>    }
>
> }
>
>
>
> This request finishes in 250 seconds, and we can't paginate for this 
> service for functional reason so we have to use limit:-1, and the 
> cardinality of the studentId is 7500.
>
>
>
> If I try the same with flat facet it finishes in 3 seconds :
> stats=true&facet=true&stats.field={!tag=piv1
> sum=true}grades&facet.pivot={!stats=piv1}studentId
>
>
>
> We are hoping to use one approach json or flat for all our services. 
> JSON facet performance is better for many case.
>
>
>
> Please advise on why the performance for this is so bad and if we can 
> improve it. Also what is the default algorithm used for json facet.
>
>
>
> Thanks
>
> Mikhail
>

Mime
View raw message