Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed id pamam's behavior to set column's value as document id #14

Merged
merged 2 commits into from
Nov 30, 2015

Conversation

sakama
Copy link
Contributor

@sakama sakama commented Nov 30, 2015

This pull-request is based on pull-request #11, and I corrected confliction of code.
I confirmed it worked fine.

id option of cuurrent version(v0.1.8) doesn't work correctly.

For example, I run with followwing config.yml,

out:
  type: elasticsearch
  id: id
  nodes:
    - {host: localhost, port: 9300}
  index: embulk
  index_type: embulk

I can get like follwing result.

{
    "_index" : "embulk",
    "_type" : "embulk",
    "_id" : "AVFWxh4LT8S5KFvme3FD",
    "_score" : 1.0,
    "_source":{
        "id":4,
        "account":11270,
        "time":"2015-01-29T11:54:36.000Z",
        "purchase":"2015-01-29T00:00:00.000Z",
        "comment":"NULL"
    }
}

But expected result is like below.
We can set document id correctly and we can search with id params via REST API.

$ curl -XGET localhost:9200/embulk/embulk/4
{
    "_index" : "embulk",
    "_type" : "embulk",
    "_id" : "4",
    "_score" : 1.0,
    "_source":{
        "id":4,
        "account":11270,
        "time":"2015-01-29T11:54:36.000Z",
        "purchase":"2015-01-29T00:00:00.000Z",
        "comment":"NULL"
    }
}

sakama added a commit that referenced this pull request Nov 30, 2015
Fixed id pamam's behavior to set column's value as document id
@sakama sakama merged commit abc269a into master Nov 30, 2015
@sakama
Copy link
Contributor Author

sakama commented Nov 30, 2015

I merged.

@sakama sakama mentioned this pull request Feb 9, 2016
@sakama sakama deleted the fix-id-setting branch June 8, 2016 04:51
@dmikurube dmikurube mentioned this pull request Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants