lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 小鱼儿 <>
Subject How can i specify a custom Analyzer for a Field of Document?
Date Tue, 10 Dec 2019 06:41:04 GMT
Directory indexDataDir ="index_data"));
Analyzer analyzer = MyLuceneAnalyzerFactory.newInstance();
IndexWriterConfig iwc = new IndexWriterConfig(analyzer);
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?

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message