我正在使用最新版本的Mongo-Connector和elastic2-doc-manager使用ElasticSearch 5.6.9索引存储在Mongo数据库实例上的数据,但我无法正常使用!
除了为gridfs文件存储的元数据之外,我的所有数据都被编入索引。
按照mongo-connector的配置文件:
{
"__comment__": "Configuration options starting with '__' are disabled",
"__comment__": "To enable them, remove the preceding '__'",
"mainAddress": "x.x.x.31:27017",
"oplogFile": "/var/log/mongo-connector/oplog.timestamp",
"noDump": false,
"batchSize": -1,
"verbosity": 0,
"continueOnError": false,
"logging": {
"type": "file",
"filename": "/var/log/mongo-connector/mongo-connector.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": {
"*.files": false,
"*.chunks":false,
"testDicom.immaginidicom": {"gridfs": true},
"testDicom.refertidicom": {"gridfs": true}
},
"docManagers": [
{
"docManager": "elastic2_doc_manager",
"targetURL": "x.x.x.40:9200",
"__bulkSize": 1,
"__uniqueKey": "_id",
"__autoCommitInterval": 3
}
]
}
任何人都可以帮助我吗?
最诚挚的问候。
萨尔瓦多