lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Kemkes <a5s...@yahoo.com>
Subject Re: Date Math
Date Wed, 23 Feb 2011 16:49:59 GMT
Thank you, that clarifies it.  Good catch on "-DAY".  I had noticed it after 
submitting but as "-1DAY" causes the same ParseException, I didn't amend the 
question.

Andreas



________________________________
From: Chris Hostetter <hossman_lucene@fucit.org>
To: solr-user@lucene.apache.org
Sent: Tue, February 22, 2011 6:18:56 PM
Subject: Re: Date Math


: org.apache.lucene.queryParser.ParseException: Cannot parse 
'last_modified:-DAY': 

    ...
: Are they not supported as a short-cut for "NOW-1DAY"?  I'm using Solr 1.4.

No, "-1DAY" is a valid DateMath string (to the DateMathParser) but as a 
field value you must specify a valid date string, which can *end* with a 
DateMath string.  so "NOW-1DAY" is legal, as is 
"2011-02-22T12:34:56Z-1DAY"

Note also: you didn't do "-1DAY" you tried "-DAY" which isn't valid 
anywhere.


-Hoss



      
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message