You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Christian Reuschling <ch...@gmail.com> on 2015/10/20 17:05:33 UTC

result grouping on all documents

Hi,

we try to get the number of documents for given time slots in the index efficiently.


For this, we query the solr index like this:

http://localhost:8014/solr/myCore/query?q=*:*&rows=1&fl=id&group=true&group.query=modified:[20110301000000000%20TO%2020130201000000000]&group.query=modified:[20130301000000000%20TO%2020150201000000000]&group.limit=1&distrib=false

for now, the modified field is a number field with trie index (tlong in schema.xml).

We have about 30M documents in the index.

This query works fine, but if the number of group queries gets higher (e.g. 200), the response time
gets terribly slow.
As we need only the number of documents per group and never the score, or some other data of the
documents, we are wondering if there is a faster method to get this information.


Thanks

Christian


Re: result grouping on all documents

Posted by Emir Arnautovic <em...@sematext.com>.
Hi Christian,
It seems to me that you can use range faceting to get counts.

Thanks,
Emir

-- 
Monitoring * Alerting * Anomaly Detection * Centralized Log Management
Solr & Elasticsearch Support * http://sematext.com/


On 20.10.2015 17:05, Christian Reuschling wrote:
> Hi,
>
> we try to get the number of documents for given time slots in the index efficiently.
>
>
> For this, we query the solr index like this:
>
> http://localhost:8014/solr/myCore/query?q=*:*&rows=1&fl=id&group=true&group.query=modified:[20110301000000000%20TO%2020130201000000000]&group.query=modified:[20130301000000000%20TO%2020150201000000000]&group.limit=1&distrib=false
>
> for now, the modified field is a number field with trie index (tlong in schema.xml).
>
> We have about 30M documents in the index.
>
> This query works fine, but if the number of group queries gets higher (e.g. 200), the response time
> gets terribly slow.
> As we need only the number of documents per group and never the score, or some other data of the
> documents, we are wondering if there is a faster method to get this information.
>
>
> Thanks
>
> Christian
>