lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From RAUNAK AGRAWAL <agrawal.rau...@gmail.com>
Subject Solr Aggregation queries are way slower than Elastic Search
Date Tue, 12 Dec 2017 00:32:24 GMT
Hi,

We have a use case where there are 4-5 dimensions and around 3500 metrics
in a single document. We have indexed only 2 dimensions and made all the
metrics as doc_values so that we can run the aggregation queries.

We have 6 million such documents and we are using solr cloud(6.6) on a 6
node cluster with 8 Vcores and 24 GB RAM each.

On the same set of hardware in elastic search we were getting the response
in about 10ms whereas in solr we are getting response in around 300-400 ms.

This is how I am querying the data.

private SolrQuery buildQuery(Integer variable1, List<Integer> groups,
List<String> metrics) {
    SolrQuery query = new SolrQuery();
    String groupQuery = " (" + groups.stream().map(g -> "group:" + g).collect
            (Collectors.joining(" OR ")) + ")";
    String finalQuery = "variable1:" + variable1 + " AND " + groupQuery;
    query.set("q", finalQuery);
    query.setRows(0);
    metrics.forEach(
            metric -> query.setGetFieldStatistics("{!sum=true }" + metric)
    );
    return query;
}

Any help will be appreciated regarding this.


Thanks,

Raunak

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message