lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Samuru Jackson" <>
Subject inclusive range search
Date Wed, 15 Mar 2006 14:14:39 GMT

I have some trouble to use the inclusive range search explained in
Lucene in Action in ch. 2.5.5

What I do is to add several fields to the index this way:

document.add(Field.Keyword("id", key));
document.add(Field.Keyword("type", type));

The focus lies on "Field.Text("date", date)" where date is a String of
the format YYYYMMDD.

My search goes this way:

search = "date:[20040101 TO 20040101]  Paris"
Query query = QueryParser.parse(search.trim(), "text", new StandardAnalyzer());
Hits hits =;

Somehow this range search does not work. I still get the same results
as without the date:[..]

Can anyone give me a hint how to use this inclusive range search?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message