I want to search for resources that are available on at least X% of days in a certain date range. The search should return hits ordered by most 'available_on' and 'probably_available_on' (the first one with a higher boost).
I managed to do that just with the 'available_on' days (Example for the range 2015-12-11 to 2015-12-15):
The usual default ranking heuristics of IDF (how rare a word is) are still in effect here so it would also make sense to wrap each term query in a constant_score query [1].
The use of "_name" in the query provides metadata that is echoed back in each hit to show what matched or not.
For fancier ranking you may want to look at the function_score [2]
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.