Directory indexDataDir = FSDirectory.open(Paths.get("index_data")); Analyzer analyzer = MyLuceneAnalyzerFactory.newInstance(); IndexWriterConfig iwc = new IndexWriterConfig(analyzer); iwc.setOpenMode(OpenMode.CREATE); iwc.setRAMBufferSizeMB(256.0); IndexWriter indexWriter = new IndexWriter(indexDataDir, iwc);
like the above code which i use for building index, the problem is, Why i can only set 1 analyzer for the whole index? I have a document set, most fields to index is only text type, suited for a StandAnalyzer or a SmartChineseAnalyzer. But the problem is, i have a special field which is a KeywordList type, like "A;B;C", which i hope i can fully control the analyzing step. How to do this in Lucene?