title: neo4j batch operation get_or_create flag overrides existing node with different id
body: <p>I'm using the neo4j batch operations endpoint.
  I want to index properties to an existing node if they have not been indexed before, ie. I'm using this <a href="http://docs.neo4j.org/chunked/stable/rest-api-unique-indexes.html#rest-api-add-an-existing-node-to-unique-index-not-indexed" rel="nofollow">endpoint</a>, with the exception of using <code>?uniqueness=get_or_create</code> flag.</p>
  
  <p>It works, when when I'm issuing two such batch requests in a row for two different nodes, <strong>the second one never gets indexed</strong>!</p>
  
  <p>Here is the payload for the the two batch requests:</p>
  
  <pre><code>FIRST ONE:
  [
      {
          method: 'POST',
          to: '/index/node/users?uniqueness=get_or_create',
          body: {
              uri: 'http: //localhost: 7474/db/data/node/2388',
              key: 'registeredInShop',
              value: '52a5f4e19e3fc8406a000006'
          }
      },
      {
          method: 'POST',
          to: '/index/node/users?uniqueness=get_or_create',
          body: {
              uri: 'http: //localhost: 7474/db/data/node/2388',
              key: 'idInShop',
              value: '1'
          }
      },
      {
          method: 'POST',
          to: '/index/node/users?uniqueness=get_or_create',
          body: {
              uri: 'http: //localhost: 7474/db/data/node/2388',
              key: 'email',
              value: 'me@shop.com'
          }
      },
      {
          method: 'POST',
          to: '/index/node/users?uniqueness=get_or_create',
          body: {
              uri: 'http: //localhost: 7474/db/data/node/2388',
              key: 'createdOn',
              value: 1386607841880
          }
      },
      {
          method: 'POST',
          to: '/index/node/users?uniqueness=get_or_create',
          body: {
              uri: 'http: //localhost: 7474/db/data/node/2388',
              key: 'attributes_isSpam',
              value: false
          }
      },
      {
          method: 'POST',
          to: '/index/node/users?uniqueness=get_or_create',
          body: {
              uri: 'http: //localhost: 7474/db/data/node/2388',
              key: 'attributes_isHardBounced',
              value: false
          }
      },
      {
          method: 'POST',
          to: '/index/node/users?uniqueness=get_or_create',
          body: {
              uri: 'http: //localhost: 7474/db/data/node/2388',
              key: 'attributes_isSubscribedAlerts',
              value: true
          }
      },
      {
          method: 'POST',
          to: '/index/node/users?uniqueness=get_or_create',
          body: {
              uri: 'http: //localhost: 7474/db/data/node/2388',
              key: 'attributes_isSubscribed',
              value: true
          }
      },
      {
          method: 'POST',
          to: '/index/node/users?uniqueness=get_or_create',
          body: {
              uri: 'http: //localhost: 7474/db/data/node/2388',
              key: 'attributes_isCustomer',
              value: false
          }
      },
      {
          method: 'POST',
          to: '/index/node/users?uniqueness=get_or_create',
          body: {
              uri: 'http: //localhost: 7474/db/data/node/2388',
              key: 'id',
              value: '52a5f4e19e3fc8406a000008'
          }
      }
  ]
  
  
  
  
  
  // SECOND ONE
  
  
  [
      {
          method: 'POST',
          to: '/index/node/users?uniqueness=get_or_create',
          body: {
              uri: 'http: //localhost: 7474/db/data/node/2390',
              key: 'registeredInShop',
              value: '52a5f4e19e3fc8406a000006'
          }
      },
      {
          method: 'POST',
          to: '/index/node/users?uniqueness=get_or_create',
          body: {
              method: 'POST',
              to: '/index/node/users?uniqueness=get_or_create',
              body: {
                  uri: 'http: //localhost: 7474/db/data/node/2390',
                  key: 'email',
                  value: 'me2@shop.com'
              }
          },
          {
              method: 'POST',
              to: '/index/node/users?uniqueness=get_or_create',
              body: {
                  uri: 'http: //localhost: 7474/db/data/node/2390',
                  key: 'createdOn',
                  value: 1386607842460
              }
          },
          {
              method: 'POST',
              to: '/index/node/users?uniqueness=get_or_create',
              body: {
                  uri: 'http: //localhost: 7474/db/data/node/2390',
                  key: 'attributes_isSpam',
                  value: false
              }
          },
          {
              method: 'POST',
              to: '/index/node/users?uniqueness=get_or_create',
              body: {
                  uri: 'http: //localhost: 7474/db/data/node/2390',
                  key: 'attributes_isHardBounced',
                  value: false
              }
          },
          {
              method: 'POST',
              to: '/index/node/users?uniqueness=get_or_create',
              body: {
                  uri: 'http: //localhost: 7474/db/data/node/2390',
                  key: 'attributes_isSubscribedAlerts',
                  value: true
              }
          },
          {
              method: 'POST',
              to: '/index/node/users?uniqueness=get_or_create',
              body: {
                  uri: 'http: //localhost: 7474/db/data/node/2390',
                  key: 'attributes_isSubscribed',
                  value: true
              }
          },
          {
              method: 'POST',
              to: '/index/node/users?uniqueness=get_or_create',
              body: {
                  uri: 'http: //localhost: 7474/db/data/node/2390',
                  key: 'attributes_isCustomer',
                  value: false
              }
          },
          {
              method: 'POST',
              to: '/index/node/users?uniqueness=get_or_create',
              body: {
                  uri: 'http: //localhost: 7474/db/data/node/2390',
                  key: 'id',
                  value: '52a5f4e29e3fc8406a000016'
              }
          }
      ]
  </code></pre>
  
  <p>Any ideea as to why this is happening? If I remove <code>uniqueness=get_or_create</code> it works, but it's exactly what I want to achieve!</p>