lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Using DateMath + range queries + Long doesn't work
Date Sat, 07 Aug 2010 02:19:32 GMT
:     lastModified:[ms(NOW/DAY-1DAY) TO ms()] AND ... regular query ...
: 
: This however doesn't work. If I use the following:
	...
:     lastModified:[1280811600000 TO ms()] AND ... regular query ...
: 
: I do get results.

Are you sure that last example works?  it shouldn't.

If lastModified is a field using TrieLongField (or SortableLongField) then 
the "lucene" query parser (the default) is going to expect those entpoints 
to both be long values -- it doesn't know how to parse the function syntax.

I can't get that last example of yours to work in Solr 1.4.1 -- I don't think we 
have anything that will work like what you are looking for.

If you can use a TrieDateField instead of a "Long" then you can 
certianly use lastModified:[NOW/DAY-1DAY TO NOW]




-Hoss


Mime
View raw message