lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Seeta Somagani" <>
Subject RE: RangeQuery or BooleanQuery?
Date Tue, 28 Feb 2006 16:10:21 GMT
Please ignore the ContextQueryParser... I dumped that and switched back to the QueryParser
which still gives me the same result.

Seeta Somagani

-----Original Message-----
From: Seeta Somagani [] 
Sent: Tuesday, February 28, 2006 10:54 AM
Subject: RangeQuery or BooleanQuery?




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

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

View raw message