IndexSearcher is = new IndexSearcher("index");IndexReader ir = 
is.getIndexReader().open("index");System.out.println("No of documents in index 
= "+ir.numDocs());
The last statement shows no of documents = 167. that means IndexReader is 
reading from index, which is open. I think the problem may exists in query 
parser. I am using following code
QueryParser parser = new QueryParser("content", analyzer);                      
  Query query = parser.parse(queryString);        Hits hits = is.search(query); 
       




> Date: Wed, 27 Jan 2010 12:47:57 +0100
> Subject: Re: Index searching problem
> From: simon.willna...@googlemail.com
> To: java-user@lucene.apache.org
> 
> Do you open the searcher  / reader after you call commit on the writer?
> 
> simon
 


                                          
_________________________________________________________________
Hotmail: Trusted email with powerful SPAM protection.
https://signup.live.com/signup.aspx?id=60969

Reply via email to