lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Asif Nawaz <asifna...@hotmail.com>
Subject RE: Index searching problem
Date Wed, 27 Jan 2010 15:53:44 GMT


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.willnauer@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
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message