In the demo example for hotel database searching. I am confused how to open the index and where should i fit that code. In SearchEngine.java file i opened the index this way IndexSearcher is = new IndexSearcher(IndexReader.open("index"));
but it's not working and still returns 0 hits :( > 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 > > On Wed, Jan 27, 2010 at 12:40 PM, Asif Nawaz <asifna...@hotmail.com> wrote: > > > > ok. it works when i add commit and close indexes. when open the index file > > with Lukes, it shows me the list of documents that were matched. But in my > > program it returns no of hits = 0. Why??? > > Hits hits = se.performSearch("significance");System.out.println("hits > > length = "+ hits.length()); > > _________________________________________________________________ Hotmail: Trusted email with powerful SPAM protection. https://signup.live.com/signup.aspx?id=60969