This newest version simplifies a lot of cruft from the previous version.
A FunctionQuery takes a ValueSource.
The ValueSource produces a DocValues object for a specific IndexReader (It's like a lucene scorer).
The ValueSource is also used as input to functions, which are ValueSources themselves.
So, you can do things (symbolically), like
A useful one for boosting more recent dates might be:
I'm not sure if this is the final form yet... perhaps the division between ValueSource and Query could be erased such that every value source is a query already (so that you don't need to pass it to a FunctionQuery).
It would also be nice to freely mix a lucene Query and a ValueSource so that you could do something like:
Of course, I haven't done the "product" function yet... right now, the normal way tocombine with other queries to influence the score is to put it in a boolean query:
the score from the function query is added to the other query.