Hi Erick, thanks for your reply.here is the searcher class to search the document
Directory fsDir = FSDirectory.getDirectory(indexDir, false); IndexSearcher is = new IndexSearcher(fsDir); QueryParser parser=new QueryParser("testRecords",new SimpleAnalyzer()); Query query = parser.parse(queryString); Hits hits =is.search(query); Erick Erickson wrote: > > I recommend you get a copy of Luke (google Lucene, luke) and > examine your index. Luke will also allow you to see how various queries > parse. Since you haven't shown how you parse your query, > anything anyone says would be a guess. > > But at a guess, you may be having troubles with capitalization > in your query. > > Also, query.toString() will show you what the actual Lucene > query looks like. > > Best > Erick > > On 6/19/07, Sebastin <[EMAIL PROTECTED]> wrote: >> >> >> Hi All, >> i index my document using SimpleAnalyzer() when i search the >> Indexed >> field in the searcher class it doesnt give me the results.help me to sort >> out this issue. >> >> My Code: >> >> test="9840836598" >> test1="bch01" >> >> testRecords=(test+" "+test1); >> >> document.add("testRecords",testRecords,Field.Store.NO, >> Field.Index.Tokenized) >> >> indexwriter.addDcument(document,new SimpleAnalyzer()); >> >> please help me >> >> Thanks in advance >> >> >> -- >> View this message in context: >> http://www.nabble.com/how-to-search-the-fields-in-SimpleAnalyzer-tf3944677.html#a11189642 >> 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] >> >> > > -- View this message in context: http://www.nabble.com/how-to-search-the-fields-in-SimpleAnalyzer-tf3944677.html#a11195565 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]