lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Weiwei Wang <>
Subject HOW to do date range searchi in 3.0
Date Wed, 09 Dec 2009 03:23:02 GMT
Hi, all
     I need to do a date range search like date:[a previous time to null]
I used a filter to do this job, the code  is shown below:
    Calendar c = Calendar.getInstance();
    c.setTimeInMillis(c.getTimeInMillis() -
        * RosaCrawlerConstants.ONE_DAY_IN_MILLISECOND);
    String fromTime = DateTools.dateToString(c.getTime(),
    Query updateTimeRange = new
    query.add(updateTimeRange, BooleanClause.Occur.MUST);

However, it doesn't work as before in version 2.4.1(I'm updating my project
from version 2.4.1 to lucenen 3.0.0)

Could anybody here offer me a solution?
Weiwei Wang
Alex Wang
Room 403, Mengmin Wei Building
Computer Science Department
Gulou Campus of Nanjing University
Nanjing, P.R.China, 210093


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