lzyxx77 commented on issue #2306:
URL:
https://github.com/apache/incubator-hugegraph/issues/2306#issuecomment-1707745693
> There is a line
>
> ```
> .order().by(values, desc).by(keys, asc)
> ```
>
> in the gremlin you provided. but there is no such attribute in the
provided schema
In this statement I wrote, "values" and "keys" are attribute names used for
sorting. In this context, they are extracted from the previous results,
specifically corresponding to the key and value used in the
.groupCount().by("tag.name")
step, rather than referring to specific properties in the schema statement.
A similar query that also use `.order().by(values, desc).by(keys, asc)` can
work successfully.

```
result =
g.V().has("Person","id",$personId).repeat(both("Person_knows_Person"))
.emit().times(2)
.dedup().has("id", neq($personId))
.as("friends")
.in("Post_hasCreator_Person")
.where(
__.out("Post_hasTag_Tag").has("name",$tagName)
)
.as("Post")
.out("Post_hasTag_Tag")
.has("name", neq($tagName))
.as('Tag')
.project("postId","tagName")
.by(select("Post").values("id"))
.by(select("Tag").values("name"))
.dedup()
.groupCount().by(select("tagName"))
.unfold()
.order().by(values, desc).by(keys, asc)
.limit(10)
.project("otherTag.name","postCount")
.by(select(keys))
.by(select(values))
result
```
So,I think is not that problem,thank u
--
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]