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 14:47:59 GMT

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