0

I am wondering if there's a way to achieve what I want. I did see a post similar to this but without any answers. Solr Facet Query
Basically, I have a field named msg_type that can have only three values log, warnings and errors. What I want is a count of each of these three categories per month starting from one year before.
E.g.
July 2012: Logs = 20, Warnings = 30, Errors = 40
August 2012 Logs = 22, Warnings = 32, Errors = 50
...

Can someone let me know the query I should use for this?

Thanks

Community
  • 1
  • 1
dehsams123
  • 251
  • 2
  • 7
  • 18

1 Answers1

0

I would suggest check for Solr pivots for this kind of hierarchical faceting.

This will allow you to facet on Dates and then on the error types giving individual counts for each.

e.g. facet.pivot = date,error_type

Response should be as below

date
    error - 1
    warning - 2
    info - 3
date ......
Jayendra
  • 52,349
  • 4
  • 80
  • 90