我正在尝试使用 lucene 4.10.3 的 StandardAnalyzer 按标题搜索文档。我从文件中读取了引号,并添加了双引号来构造查询:
Query query = parser.parse("\""+doc.get("title")+"\"");
问题是,当它读取引用 PHILIPPINES SAYS DEBT PACT "BETTER THAN MEXICO'S lucene 返回此错误
Cannot parse '"PHILIPPINES SAYS DEBT PACT "BETTER THAN MEXICO'S"': Lexical error at line 1, column 52. Encountered: <EOF> after : ""
我该如何解决?
谢谢!