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

mongo-connector removing _id from source. #5

Open
ariful-khan opened this issue Jun 20, 2016 · 1 comment
Open

mongo-connector removing _id from source. #5

ariful-khan opened this issue Jun 20, 2016 · 1 comment

Comments

@ariful-khan
Copy link

here is mongo connector config

{
  "mainAddress": "localhost:27017",
  "oplogFile": "/var/log/mongo-connector/oplog.cs.timestamp",
  "noDump": false,
  "batchSize": -1,
  "verbosity": 1,
  "continueOnError": true,

  "logging": {
    "type": "file",
    "filename": "/var/log/mongo-connector/mongo-connector-cs.log",
    "format": "%(asctime)s [%(levelname)s] %(name)s:%(lineno)d - %(message)s",
    "__rotationWhen": "D",
    "__rotationInterval": 1,
    "__rotationBackups": 10,

    "__type": "syslog",
    "__host": "localhost:514"
  },

  "authentication": {
    "__adminUsername": "username",
    "__password": "password",
    "__passwordFile": "mongo-connector.pwd"
  },

  "__comment__": "For more information about SSL with MongoDB, please see http://docs.mongodb.org/manual/tutorial/configure-ssl-clients/",
  "__ssl": {
    "__sslCertfile": "Path to certificate to identify the local connection against MongoDB",
    "__sslKeyfile": "Path to the private key for sslCertfile. Not necessary if already included in sslCertfile.",
    "__sslCACerts": "Path to concatenated set of certificate authority certificates to validate the other side of the connection",
    "__sslCertificatePolicy": "Policy for validating SSL certificates provided from the other end of the connection. Possible values are 'required' (require and validate certificates), 'optional' (validate but don't require a certificate), and 'ignored' (ignore certificates)."
  },

  "__fields": ["field1", "field2", "field3"],

  "namespaces": {
    "include": ["fa.fa_new_data"],
    "mapping": {
      "fa.fa_new_data": "fa_new_data.new_data"
    },
    "__gridfs": ["db.fs"]
  },

  "docManagers": [
    {
      "docManager": "elastic2_doc_manager",
      "targetURL": "localhost:9200",
      "bulkSize": 5000,
      "uniqueKey": "_id",
      "__autoCommitInterval": null
    }
  ]
}

i am getting like this,

{
"_index": "fa_new_data",
"_type": "new_data",
"_id": "5497c1c4cbb648eb618b4568",
"_version": 1,
"_score": 1,
"_source": {
"checkbox": true,
...........................
}
}

but i want "_id" inside "_source" as well. like this

{
"_index": "fa_new_data",
"_type": "new_data",
"_id": "5497c1c4cbb648eb618b4568",
"_version": 1,
"_score": 1,
"_source": {
"checkbox": true,
"_id": "5497c1c4cbb648eb618b4568",
...........................
}
}

how can I do this ?

@llvtt
Copy link

llvtt commented Jul 18, 2016

@neconest, there isn't a way to do this right now. Can you provide a reason why _id should also be inside of _source?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants