Analyzer indexAnalyzer = ...; Analyzer queryAnalyzer = ...; // indexing side IndexWriter writer = new IndexWriter(version, config, indexAnalyzer); ... add documents
// query side QueryParser parser = new QueryParser(version, "defaultField", queryAnalyzer); searcher.search(parser.parse(query), 10); hope that helps simon On Sat, Dec 3, 2011 at 12:01 PM, parnab <parnab.2...@gmail.com> wrote: > I have two analyzers one suited for indexing and the other suited for query > parsing.How can i specify indexer to use a specific analyzer and query > parser to use the other one. > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/How-to-Use-separte-Analyzer-for-indexing-and-Query-Parsing-tp3556878p3556878.html > Sent from the Lucene - General mailing list archive at Nabble.com.