dosubot[bot] commented on issue #2788:
URL: 
https://github.com/apache/incubator-hugegraph/issues/2788#issuecomment-2953775685

   <!-- Answer -->
   HugeGraph 的 P.within 过滤器在 set 
集合属性上不会做元素级别的判断,而是判断整个集合是否等于候选集合之一,所以你遇到的写法不会返回包含“涉案”的数据。这是 HugeGraph 
的已知行为,并不是你的写法问题,而是功能本身不支持这种用法。
   
   要实现 set 属性中包含某个元素的过滤,请用 CONTAINS 操作符。例如:
   
   ```groovy
   .option("domain", has("tags", CONTAINS, "涉案"))
   ```
   
   注意:使用 CONTAINS 需要 tags 属性有二级索引(secondary index)或搜索索引(search 
index),否则会报错或性能较差。你可以通过 schema 确认 tags 字段已经有 domain_by_tags 索引,符合要求。
   
   
相关讨论和官方建议可参考:[issues/2753](https://github.com/apache/incubator-hugegraph/issues/2753)
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/138e7d0d-722c-44a3-a79b-e3da9c7b1aed?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/138e7d0d-722c-44a3-a79b-e3da9c7b1aed?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/138e7d0d-722c-44a3-a79b-e3da9c7b1aed?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/138e7d0d-722c-44a3-a79b-e3da9c7b1aed?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/138e7d0d-722c-44a3-a79b-e3da9c7b1aed?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/138e7d0d-722c-44a3-a79b-e3da9c7b1aed?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/138e7d0d-722c-44a3-a79b-e3da9c7b1aed?feedback_type=other)</sup>&nbsp;&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[!
 [Share on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/incubator-hugegraph/issues/2788)


-- 
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: issues-unsubscr...@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@hugegraph.apache.org
For additional commands, e-mail: issues-h...@hugegraph.apache.org

Reply via email to