无法正确使用 lucene 的关键字分析器,
String term = "new york";
// id and location are the fields in which i want to search the "term"
MultiFieldQueryParser queryParser = new MultiFieldQueryParser(
Version.LUCENE_30,
{"id", "location"},
new KeywordAnalyzer());
Query query = queryParser.parse(term);
System.out.println(query.toString());
OUTCOME: (id:new location:new) (id:york location:york)
预期结果: (id:new york location:new york) (id:new york location:new york)
请帮我确定我在这里做错了什么?