Re: Handling missing date fields in a date-oriented function query

2010-04-16 Thread Yonik Seeley
On Fri, Apr 16, 2010 at 4:42 PM, Chris Harris wrote: > The docs dated exactly *at* the epoch, though, are trouble, because I > can't tell those docs apart from the undated docs in my function > query. Neither can Solr currently... it's a Lucene FieldCache limitation. The other thing we can't do b

Re: Handling missing date fields in a date-oriented function query

2010-04-16 Thread Chris Harris
I still like this approach, but I've discovered one wrinkle, which is that I have dates in my dataset dated at the epoch (i.e. midnight Jan 1, 1970), as well as before the epoch (e.g. midnight Jan 1, 1950). The docs dated *before* the epoch so far don't seem to be a problem; they end up having a n

Re: Handling missing date fields in a date-oriented function query

2010-04-08 Thread Chris Harris
If anyone is curious, I've created a patch that creates a variant of map that can be used in the way indicated below. See http://issues.apache.org/jira/browse/SOLR-1871 On Wed, Apr 7, 2010 at 3:41 PM, Chris Harris wrote: > Option 1. Use map > > The most obvious way to do this would be to wrap th

Re: Handling missing date fields in a date-oriented function query

2010-04-08 Thread Chris Harris
On Wed, Apr 7, 2010 at 7:10 PM, Lance Norskog wrote: >> Since min(a,b) == -1*max(-1*a, -1*b), you could rewrite the previous >> expression using this more complicated logic and it would work. But >> that's ugly. >> >> Also, it would crash anyway. It looks like max currently requires one >> of its

Re: Handling missing date fields in a date-oriented function query

2010-04-07 Thread Lance Norskog
> Since min(a,b) == -1*max(-1*a, -1*b), you could rewrite the previous > expression using this more complicated logic and it would work. But > that's ugly. > > Also, it would crash anyway. It looks like max currently requires one > of its arguments to be a float constant, and neither of our args wo

Handling missing date fields in a date-oriented function query

2010-04-07 Thread Chris Harris
I'm using function queries to boost more recent documents, using something like the recip(ms(NOW,mydatefield),3.16e-11,1,1) approach described on the wiki: http://wiki.apache.org/solr/FunctionQuery#Date_Boosting What I'd like to do is figure out the best way to tweak how documents with missi