hi,

On Wed, Nov 17, 2010 at 04:39:00PM +0100, Peter Blokland wrote:

> i'm using solr and am trying to limit my resultset to documents
> that either have a publication date in the range * to now, or
> have no publication date set at all (field is not present). 
> however, using this :
> 
> (pubdate:[* TO NOW]) OR ( NOT pubdate:*)
> 
> gives me only the documents in the range * to now (reversing the
> two clauses has no effect). 

answering my own question : the above expresseion was a filter-query,
where the main query was (e.g.)

type:page

when only using the left-hand expression, this evaluates to

type:page NOT pubdate:*

which is a valid query. however, using the full expression seems to
make lucene evaluate 

NOT pubdate:*

as a query, which is not legal, and returns an empty result. so, re-
writing the filter-query as 

(type:page AND pubdate:[* TO NOW]) OR (type:page NOT pubdate:*)

solved my problem... took me long enough...

-- 
CUL8R, Peter.

www.desk.nl --- Sent from my NetBSD-powered Talkie Toasterâ„¢

Reply via email to