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

   <!-- Answer -->
   This is a known design limitation in HugeGraph 1.7.0. The inconsistent 
results between your two Gremlin queries are due to how HugeGraph's query 
planner handles filter placement and index enforcement. Filters directly after 
`g.E()` or `g.V()` are pushed into backend queries and require the property to 
be indexed; filters inside `match()` or nested traversals are applied as 
in-memory predicates after data retrieval, bypassing index checks. This can 
lead to inconsistent results or exceptions compared to JanusGraph and 
TinkerPop, which do not enforce index requirements in the same way 
[[source]](https://github.com/apache/incubator-hugegraph/issues/2929#issuecomment-3714894172)
 
[[source]](https://github.com/apache/incubator-hugegraph/issues/2930#issuecomment-3714982445).
   
   For consistent behavior, ensure properties used in filters are indexed, or 
avoid placing filters inside `match()`/nested traversals when consistency is 
required. This behavior is expected in 1.7.0 and is not currently addressed by 
recent updates.
   
   
   <!-- 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/08d3a2bf-a47f-4f53-9bb4-386f6582c970?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/08d3a2bf-a47f-4f53-9bb4-386f6582c970?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/08d3a2bf-a47f-4f53-9bb4-386f6582c970?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/08d3a2bf-a47f-4f53-9bb4-386f6582c970?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/08d3a2bf-a47f-4f53-9bb4-386f6582c970?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/08d3a2bf-a47f-4f53-9bb4-386f6582c970?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/08d3a2bf-a47f-4f53-9bb4-386f6582c970?feedback_type=other)</sup>
   
   [![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/e5e246fa-a522-4d8a-ab3c-e2588b5b501b/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=This%20is%20a%20known%20design%20limitation%20in%20HugeGraph%201.7.0.%20The%20inconsistent%20results%20between%20your%20two%20Gremlin%20queries%20are%20due%20to%20how%20HugeGraph%27s%20query%20planner%20handles%20filter%20placement%20and%20index%20enforcement.%20Filters%20directly%20after%20%60g.E%28%29%60%20or%20%60g.V%28%29%60%20are%20pushed%20into%20backend%20queries%20and%20require%20the%20property%20to%20be%20indexed%3B%20filters%20inside%20%60match%28%29%60%20or%20nested%20traversals%20are%20applied%20as%20in-memory%20predicates%20after%20data%20retrieval%2C%20bypassing%20index%20checks.%20This%20can%20lead%20to%20inconsistent%20results%20or%20exceptions%20compared%20to%20JanusGraph%20and%20TinkerPop%2C%20which%20do%20not%20enforce%20index%20
 
requirements%20in%20the%20same%20way%20%5B%5Bsource%5D%5D%28https%3A//github.com/apache/incubator-hugegraph/issues/2929%23issuecomment-3714894172%29%20%5B%5Bsource%5D%5D%28https%3A//github.com/apache/incubator-hugegraph/issues/2930%23issuecomment-3714982445%29.%0A%0AFor%20consistent%20behavior%2C%20ensure%20properties%20used%20in%20filters%20are%20indexed%2C%20or%20avoid%20placing%20filters%20inside%20%60match%28%29%60/nested%20traversals%20when%20consistency%20is%20required.%20This%20behavior%20is%20expected%20in%201.7.0%20and%20is%20not%20currently%20addressed%20by%20recent%20updates.)&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/2931)


-- 
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]

Reply via email to