You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@s2graph.apache.org by "Hyunsung Jo (JIRA)" <ji...@apache.org> on 2016/11/16 18:18:58 UTC

[jira] [Comment Edited] (S2GRAPH-128) Document new feature S2GRAPH-123 (Support different index on out/in direction)

    [ https://issues.apache.org/jira/browse/S2GRAPH-128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15671194#comment-15671194 ] 

Hyunsung Jo edited comment on S2GRAPH-128 at 11/16/16 6:18 PM:
---------------------------------------------------------------

Here is  the first draft. Let me know what you think.
{noformat}
#### Directional Indices and Sampling (Optional) 
An S2Graph label can be indexed by different properties on different directions as well as apply different methods of sampling in order to avoid hot regions.
A common use case for this feature is when indexing user clicks. It is quite common for a small number of articles to get most of the clicks (usually the most popular or featured). In such cases, it would be helpful to be able to drop a predefined proportion of in-direction `index edges`.
Available index directions are `in`, `out`, and `both`.
While each property-direction pair can select from `drop`, `sample`, and `hash_sample` as its sampling method. Please note that `sample` method is used for random sampling while `hash_sample` is for quota sampling. `sample` and `hash_sample` methods require a `rate` option as a sampling rate while `hash_sample` requires an additional option field of `totalModular` to set the quota. Whether or not the degree of an index will be stored is determined by a `degree` option. 
```
"indices": [
  {
    "name": "_PK",
    "propNames": [
      "_timestamp"
    ], 
    "direction": "out" // [both/in/out, default both], 
    "options": {
      "method": "hash_sample" // [drop, sample, hash_sample],
      "totalModular": 100, 
      "rate": 0.1, 
      "degree": true
    }
  }
]
```
{noformat}


was (Author: hyunsung.jo):
Here is  the first draft. Let me know what you think.
{noformat}
#### Directional Indices and Sampling (Optional) 
An S2Graph label can be indexed on different properties on different directions as well as apply different methods of sampling in order to avoid hot regions.
A common use case for this feature is when indexing user clicks. It is quite common for a small number of articles to get most of the clicks (usually the most popular or featured). In such cases, it would be helpful to be able to drop a predefined proportion of in-direction `index edges`.
Available index directions are `in`, `out`, and `both`.
While each property-direction pair can select from `drop`, `sample`, and `hash_sample` as its sampling method. Please note that `sample` method is used for random sampling while `hash_sample` is for quota sampling. `sample` and `hash_sample` methods require a `rate` option as a sampling rate while `hash_sample` requires an additional option field of `totalModular` to set the quota. Whether or not the degree of an index will be stored is determined by a `degree` option. 
```
"indices": [
  {
    "name": "_PK",
    "propNames": [
      "_timestamp"
    ], 
    "direction": "out" // [both/in/out, default both], 
    "options": {
      "method": "hash_sample" // [drop, sample, hash_sample],
      "totalModular": 100, 
      "rate": 0.1, 
      "degree": true
    }
  }
]
```
{noformat}

> Document new feature S2GRAPH-123 (Support different index on out/in direction)
> ------------------------------------------------------------------------------
>
>                 Key: S2GRAPH-128
>                 URL: https://issues.apache.org/jira/browse/S2GRAPH-128
>             Project: S2Graph
>          Issue Type: Task
>            Reporter: Hyunsung Jo
>            Assignee: Hyunsung Jo
>            Priority: Trivial
>
> [~steamshon] Let me document the new feature S2GRAPH-123 based on the PR and JIRA issue.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)