I didn’t use it too much but I’d guess syntax support for sql would be limited 
to simple things. I’d love to learn if anybody has knowledge on the sql handler.

If your field is indexed using datetime field type or long number since epoch, 
then range faceting could be a way to group based on month or year.

Solr SQL uses streaming expressions under the hood, streaming expressions offer 
a world of different abilities when querying, but you’d need to learn it’s 
syntax.

If you want to levarage your existing SQL knowledge on top of Solr, Apache 
Spark could be an option. It can load data from Solr efficiently and run SQL to 
analyze it, plus it supports nearly anything SQL can offer in terms of 
aggregation.

-ufuk yilmaz

Sent from Mail for Windows

From: Kojo
Sent: Monday, August 21, 2023 4:06 PM
To: users@solr.apache.org
Subject: sql datetime field aggregation

Is there a way in Solr SQL to truncate data and aggregate it? for
example, by month or year in a datetime field? Or is the Solr approach
to create separate fields to enable these aggregations?

Thanks in advance,
Koji

Reply via email to