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

   <!-- Answer -->
   This is a known design limitation in HugeGraph 1.7.0. The difference in 
results between your two Gremlin queries comes from 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, while 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. For 
consistent behavior, ensure properties used in filters are indexed, or avoid 
placing filters inside `match()`/nested traversals when consistency is 
required. More details are documented in [GitHub issue 
#2929](https://github.com/apache/incubator-hugegraph/issues/2929).
   
   
   <!-- 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/be3579fc-f711-4f8b-8fcd-c0fb91b05563?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/be3579fc-f711-4f8b-8fcd-c0fb91b05563?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/be3579fc-f711-4f8b-8fcd-c0fb91b05563?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/be3579fc-f711-4f8b-8fcd-c0fb91b05563?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/be3579fc-f711-4f8b-8fcd-c0fb91b05563?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/be3579fc-f711-4f8b-8fcd-c0fb91b05563?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/be3579fc-f711-4f8b-8fcd-c0fb91b05563?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%20difference%20in%20results%20between%20your%20two%20Gremlin%20queries%20comes%20from%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%2C%20while%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%2
 
0index%20requirements%20in%20the%20same%20way.%20For%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.%20More%20details%20are%20documented%20in%20%5BGitHub%20issue%20%232929%5D%28https%3A//github.com/apache/incubator-hugegraph/issues/2929%29.)&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/2930)


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