lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Seeta Somagani" <Seeta.Somag...@xplana.com>
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.
Thanks.

Seeta Somagani

-----Original Message-----
From: Seeta Somagani [mailto:Seeta.Somagani@xplana.com] 
Sent: Tuesday, February 28, 2006 10:54 AM
To: java-user@lucene.apache.org
Subject: RangeQuery or BooleanQuery?

 

Hi,

 

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,
Field.TermVector.WITH_POSITIONS_OFFSETS));

 

 

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

 

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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message