dosubot[bot] commented on issue #2693: URL: https://github.com/apache/incubator-hugegraph/issues/2693#issuecomment-2471246775
<!-- Greeting --> @ChoelWu 你好!我是[Dosu](https://dosu.dev),我是一个可以帮助解决错误、回答问题并成为贡献者的机器人。在等待人类维护者期间,我可以帮助你解决问题。 <!-- Answer --> To filter nodes by a string property using the K-neighbor API, you should ensure that the predicate is correctly formatted in the JSON request. The correct syntax for using predicates like `P.eq` is to use a string representation in the format `"P.method(value)"`. However, it seems there might be an issue with how the value is being interpreted in your JSON. Here's how you can format your request: ```json { "label": "person", "properties": { "city": "P.eq(\"Hongkong\")" } } ``` Make sure that the entire predicate, including the method and the value, is enclosed in double quotes. If you are still encountering errors, ensure that the JSON is correctly formatted and that the `Content-Type` is set to `application/json` in your request header to avoid any `HTTP 415 Unsupported Media Type` errors <sup>[[1]](https://github.com/apache/incubator-hugegraph-doc/blob/master/content/cn/docs/guides/faq.md)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
