lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Seeta Somagani" <>
Subject RangeQuery or BooleanQuery?
Date Tue, 28 Feb 2006 15:53:56 GMT



My documents are in the following format.


doc.add(new Field ("id",page, Field.Store.YES, Field.Index.TOKENIZED));

doc.add(new Field ("content",fileContent.toString(), Field.Store.YES, Field.Index.TOKENIZED,



I need to make a query on the content over a range of "id"s.

I have the following code in my searcher stub.


QueryParser queryParser = new ContextQueryParser("content", new SimpleAnalyzer());


Query query = queryParser.parse(queryValue);


Hits hits =;


But, when I enter the query - id: [104 TO 200] content: "Marbella EspaƱa" it's just returning
me all the results while ignoring the range.

I'm getting the same result, no matter which permutations of phraseQueries, BooleanQueries
and TermQueries I'm entering.


I'd greatly appreciate any help in this regard. Thanks.

Seeta Somagani

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