我有一个同义词表,其中包含逗号分隔符。我希望Lucene在索引文本值时也考虑这些同义词。我正在使用StandardAnalyzer进行索引。我如何让Lucene也使用同义词?这是我使用StandardAnalyzer
的代码FSDirectory fsDircetory = FSDirectory.open(new File("/home/lenovo/index"));
indexwriter = new IndexWriter(fsDircetory,
new StandardAnalyzer(Version.LUCENE_31),
true,IndexWriter.MaxFieldLength.LIMITED);
Document doc = new Document();
doc.add(new Field("title",recipeVO.getTitle(),
Field.Store.YES,Field.Index.ANALYZED));
indexwriter.addDocument(doc);
indexwriter.close()