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 a calculation of Status, given the current daily date and the fields StatusDate1 and StatusDate2?
For example: A certain object contains (ignore sintax) StatusDate1: 1/9/2016, StatusDate2: 5/9/2016, knowing that today is the 9/9/2016 the expected output would be Status=2.
This Status is calculated based on the current date and the StatusDate fields of every object. I would like to facet the Status field.
Is function queries the way to go? Or do I need to handle this at index time? (A task indexing every day would seem dummy) What is the best way to tackle this issue?
Note: My solr version is 4.6.0
Regardless of faceting, have you tried the stats component? stats=true&stats.field=Status... filtering by the date fields??
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With