Given the following schema fields:
<field indexed="true" stored="true" name="Status" type="int" /> <field indexed="true" stored="true" name="StatusDate1" type="tdate" /> <field indexed="true" stored="true" name="StatusDate2" type="tdate" />
Is it possible for solr to handle the status calculation, given the current daily date and the StatusDate1 and StatusDate2 fields?
For example: a certain object contains (ignore sintax) StatusDate1: 1/9/2016, StatusDate2: 5/9/2016, knowing that today, on 9/9/2016, the expected result will be Status = 2.
This status is calculated based on the current date and StatusDate fields for each object. I would like to facet the Status field.
Are functional queries , how to go? Or do I need to handle this during the index? (Indexing a task every day seems like a dummy). What is the best way to solve this problem?
Note: My version is solr 4.6.0
source share