Hi all,

I would like to implement seasonal date searches on date ranges. I’m using SOLR 
5.4.1 and have indexed date ranges using a DateRangeField (let’s call this 
field date_ranges). 
Each document in SOLR corresponds to a biological sample and each sample was 
collected during a date range that can span from a single day to multiple 
years. For my application it makes sense to enable seasonal searches, ie find 
samples that were collected during a specific period of the year (e.g. summer, 
or February). In this type of search, the year that the sample was collected is 
not relevant, only the days of the year. I’ve been all over SOLR documentation 
and I haven’t been able to find anything that will enable do me that. The 
closest I got was a post with instructions on how to use a spatial field to do 
date searches 
(https://people.apache.org/~hossman/spatial-for-non-spatial-meetup-20130117/). 
Using the logic in that post I was able to come up with a solution but it’s 
rather complex and needs polygon searches (which in turn means installing the 
JTS Topology suite).
Before committing to that I would like to ask for your input and whether 
there’s an easier way to do these types of searches.

Many thanks,

Ioannis

-----------------------------------------
Ioannis Kirmitzoglou, PhD
Bioinformatician - Scientific Programmer 
Imperial College, London
www.vectorbase.org
www.vigilab.org

Reply via email to