lucene-java-user mailing list archives

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

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));
document.add(Field.Text("text",text));
document.add(Field.Text("date",date));

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 = indexSearcher.search(query);


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?

Thanks!

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message