I have indexed the docs successfully under the directory "LUCENE" under current directory, which have segments, _1.cfs and deletable.
Now trying to use the following code to search the index but not getting any HITS. But when I try to read through Reader and get the document with field mentioned it works which means the index done properly and its just that search is not working. Code is as follows: The following code gets a Hits object like : [EMAIL PROTECTED] But when i try to get hits.length() it is 0. Can anyone point out whats wrong ? IndexSearcher isearcher = new IndexSearcher("./LUCENE"); QueryParser parser = new QueryParser("Description", analyzer); Query query = parser.parse("based"); Hits hits = isearcher.search(query); for (int i = 0; i < hits.length(); i++) { Document hitDoc = hits.doc(i); } isearcher.close(); directory.close(); -- View this message in context: http://www.nabble.com/Issue-with-search%28%29-Help-Appreciated.-tf3551357.html#a9914639 Sent from the Lucene - Java Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]