Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要根据文档语言对文档进行索引,为此我想使用适当的分析器。是否有可能在不关闭和重新打开 IndexWriter 的情况下更改单个字段的分析器,因为这显然是一项代价高昂的任务,而且语言可能会经常更改?还是有更好的方法来处理多种语言?
谢谢
只需将适当的分析器传递给IndexWriter.addDocument