我想进行近距离查询,但是当我打电话时,
plaintextParser=new QueryParser(Lucene.version,"plaintext", new SimpleAnalyzer(version));
String queryText = "\"" + QueryParser.escape(term1) + " " + QueryParser.escape(term2)+ "\"" + "~" + window;
plaintextParser.parse(queryText);
我对term1="City"
和term2="Laurie Burnett"
,
Cannot parse '"City Laurie Burnett"~20': Encountered " <FUZ
ZY_SLOP> "~20 "" at line 1, column 45.
似乎queryparser对语法不满意。我可以直接构建一个邻近查询,而无需调用queryparser吗?或者有人可以建议更正?