title: getDegree()/isOutgoing() funcitons don't work in graphAware/neo4j-to-elasticsearch mapping.json
body: <p>Neo4j Version: 3.2.2</p>
  
  <p>Operating System: Ubuntu 16.04</p>
  
  <p>I use <code>getDegree()</code> function in mapping.json file, but the return would always be <code>null</code>; I'm using the dataset neo4j tutorial Movie/Actor dataset.</p>
  
  <p><a href="https://i.stack.imgur.com/zCAMm.png" rel="nofollow noreferrer"><strong>Output from elasticsearch request</strong></a></p>
  
  <p><strong>mapping.json</strong></p>
  
  <pre><code>{
    "defaults": {
      "key_property": "uuid",
      "nodes_index": "default-index-node",
      "relationships_index": "default-index-relationship",
      "include_remaining_properties": true
    },
    "node_mappings": [
      {
        "condition": "hasLabel('Person')",
        "type": "getLabels()",
        "properties": {
          "getDegree": "getDegree()",
          "getDegree(type)": "getDegree('ACTED_IN')",
          "getDegree(direction)": "getGegree('OUTGOING')",
          "getDegree('type', 'direction')": "getDegree('ACTED_IN', 'OUTGOING')",
          "getDegree-degree": "degree"
        }
      }
    ],
    "relationship_mappings": [
      {
        "condition": "allRelationships()",
        "type": "type",
      }
    ]
  }
  </code></pre>
  
  <p>Also if I use <code>isOutgoing(), isIncoming(), otherNode</code> function in relationship_mappings properties part, elasticsearch would never load the relationship data from neo4j. I think I probably have some misunderstanding of this sentence <code>only when one of the participating nodes "looking" at the relationship is provided</code> on this page https://github.com/graphaware/neo4j-framework/tree/master/common#inclusion-policies</p>
  
  <p><strong>mapping.json</strong></p>
  
  <pre><code>{
    "defaults": {
      "key_property": "uuid",
      "nodes_index": "default-index-node",
      "relationships_index": "default-index-relationship",
      "include_remaining_properties": true
    },
    "node_mappings": [
      {
        "condition": "allNodes()",
        "type": "getLabels()"
      }
    ],
    "relationship_mappings": [
      {
        "condition": "allRelationships()",
        "type": "type",
        "properties": {
          "isOutgoing": "isOutgoing()",
          "isIncomming": "isIncomming()",
          "otherNode": "otherNode"
        }
      }
    ]
  }
  </code></pre>
  
  <p>BTW, is there any page that list all of the functions that we can use in mapping.json? I know two of them </p>
  
  <ol>
  <li><code>github.com/graphaware/neo4j-framework/tree/master/common#inclusion-policies</code></li>
  <li><code>github.com/graphaware/neo4j-to-elasticsearch/blob/master/docs/json-mapper.md</code>
  <strong>but</strong> it seems there are more, since I can use <code>getType()</code>, which hasn't been listed in any of the above pages.</li>
  </ol>
  
  <p>Please let me know if I can provide any further help to solve the problem</p>
  
  <p>Thanks!</p>