{“uuid”:121222151,“路径”:“/aaa/bbb/ccc.json”,“名称”:“newDoc1”,“uuid”:121222152,“路径”:“/aaa/ddd.json”,“名称": "newDoc1"}
我正在使用 StructuredQueryBuilder 搜索结果。
StructuredQueryBuilder queryBuilder = new StructuredQueryBuilder();
StructuredQueryDefinition containPositiveQuery = queryBuilder.containerQuery(queryBuilder.jsonProperty("name"), queryBuilder.term("newDoc1"));
StructuredQueryDefinition containNegativeQuery = queryBuilder.containerQuery(queryBuilder.jsonProperty("path"), queryBuilder.term("*/bbb/*"));
StructuredQueryDefinition containQuery = qb.andNot(containPositiveQuery, containNegativeQuery);
我希望结果搜索名称“newDoc1”,但不在包含“*/bbb/*”的路径中。上面的代码不起作用。可能是什么原因?