You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@s2graph.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/04/23 02:41:00 UTC
[jira] [Commented] (S2GRAPH-207) Provides a way to query data with
the value of the Vertex property in a GraphQL query.
[ https://issues.apache.org/jira/browse/S2GRAPH-207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16447484#comment-16447484 ]
ASF GitHub Bot commented on S2GRAPH-207:
----------------------------------------
GitHub user daewon opened a pull request:
https://github.com/apache/incubator-s2graph/pull/159
[S2GRAPH-207] Provides a way to query data with the value of the Vertex property in a GraphQL query.
# Added the ability to search for the value of a vertex properties
you can use the 'apache [lucene](https://lucene.apache.org) query' directly in the 'search' parameter to search vertex by property values
example)
{noformat}
```graphql
{
kakao {
user(search: "gender: M OR gender: F") {
id
age
gender
}
}
}
```
{noformat}
{noformat}
```graphql
{
kakao {
user(search: "age: 19 OR age: 20") {
id
age
gender
}
}
}
```
{noformat}
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/daewon/incubator-s2graph S2GRAPH-207
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-s2graph/pull/159.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #159
----
commit 3ac20b409479261dce1c26e3d489dff6f934c78a
Author: daewon <da...@...>
Date: 2018-04-18T05:42:56Z
add 'Contains' Claues in where parser
commit ba938bc087898ba6221bbb53ea62e0ec12185fe3
Author: daewon <da...@...>
Date: 2018-04-19T09:13:34Z
add search vertices
commit ea26552f54f92f096711c66c5b86a85ca5692dd3
Author: daewon <da...@...>
Date: 2018-04-19T09:55:12Z
refactor search
commit f187040411f8ff967972df7dff2fafeff1d8a993
Author: daewon <da...@...>
Date: 2018-04-19T09:59:04Z
remove hard_coded var
commit 8ed6d20faa907e08f43a22360bcbeaab43d273e8
Author: daewon <da...@...>
Date: 2018-04-20T05:50:17Z
add test case for search vertex query
commit d7a630d418d9fb4468197f97d8ec5346b63cc5f3
Author: daewon <da...@...>
Date: 2018-04-20T06:59:18Z
refactor: (vertex, queryParam) -> edgeQueryParam
----
> Provides a way to query data with the value of the Vertex property in a GraphQL query.
> --------------------------------------------------------------------------------------
>
> Key: S2GRAPH-207
> URL: https://issues.apache.org/jira/browse/S2GRAPH-207
> Project: S2Graph
> Issue Type: Improvement
> Components: s2core, s2graphql
> Reporter: Daewon Jeong
> Assignee: Daewon Jeong
> Priority: Minor
>
> h1. Provides a way to query data with the value of the Vertex property in a GraphQL query.
> Now implementations in GraphQL need to know the starting Vertex ID to be able to query.
>
> Suppose have the following user.
> {noformat}
> User {
> id: "daewon"
> age: 35
> }
> {noformat}
>
> The query that fetch a friends of user 'daewon' is shown below. It works well.
> {noformat}
> User(id: "daewon") {
> friends {
> id
> }
> }
> {noformat}
>
> This time, let's consider a query that fetch a friends who is older than 30 years old.
> Below is the expected query.
> {noformat}
> Kakao {
> User(search: "age > 30") {
> id
> name
> friends {
> User {
> id
> name
> }
> }
> }
> }
> {noformat}
> However, this feature is not available at this time.
>
> Things to implement
> - Must be able to use the properties of 'User' ServiceColumn as a parameter in 'search'
> - Should be able to find vertices that match the properties defined in the above parameters(search).
>
> Associated issues that must be preceded and handled
> - Provide global index: https://issues.apache.org/jira/browse/S2GRAPH-151
> - Refactor S2Query to specify index on getVertices: https://issues.apache.org/jira/browse/S2GRAPH-155
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)