Add support of "bson.dbref.DBRef" data type for formatting value. The…#692
Add support of "bson.dbref.DBRef" data type for formatting value. The…#692burnettzhong wants to merge 3 commits intoyougov:masterfrom
Conversation
| elif isinstance(value, datetime.datetime): | ||
| return value | ||
| elif isinstance(value, bson.dbref.DBRef): | ||
| return value.id |
There was a problem hiding this comment.
What about the DBRef.database and DBRef.collection?
There was a problem hiding this comment.
Yes, you are correct, this change does not cover database and collection value, but only the id value.
At least, it supports DBRef data from MongoDB, and it can be used by complex search like "join" in Solr.
In order to cover database and collection value, we need to modify function transform_element and format_document which I'm working on it.
| ----------- | ||
| Add support to DBRef whose datatype is "bson.dbref.DBRef". | ||
|
|
||
|
|
There was a problem hiding this comment.
Remove this, the change-log is https://github.com/mongodb-labs/mongo-connector/blob/master/CHANGELOG.rst.
… "bson.dbref.DBRef" is used by Solr DBRef.
…base and DBref.id.
|
I have updated it to cover all database, collection and id data. It works perfect in my local environment. |
|
BTW, have no idea why the CI is failed for MongoDB 2.4.14 |
|
Does this work fine with elasticsearch? |
… "bson.dbref.DBRef" is used by Solr DBRef.