: Is it possible to do date math in a FunctionQuery?  This doesn't work, but I'm
: looking for something like:
: 
: bf=recip((NOW-updated),1,200,10) when using DisMax to get the elapsed time
: between NOW and when the document was updated (where updated is a Date field).

"Date Math" (as implemented by the DateMathParser) only deals with 
rounding or adding intervals to dates -- not computing differneces between 
dates.  The key distinction being that DateMath expressions all evaluate 
to real dates, what you are descrbing owuld evaluate to a date interval 
(ie: a number)

I imagine what you are describing could be implmeneted as a new type of 
ValueSource that took in two date fields and a unit (ie: month, day, year, 
etc...) and returned the difference between those dates as a numeric valud 
of those units.  An alternate form could take in a date math expression as 
a string in place of one date field so you could compute the difference 
beteween a field and a fixed value.

        ...but that doesn't exist yet.


-Hoss

Reply via email to