mongodb和elasticsearch索引对象之间uniqueidentifer字段的差异

时间:2013-06-13 14:55:27

标签: mongodb

我正在使用mongo river的elasticsearch。当我索引它们时,我得到的所有数字和文本字段都没有任何变化。当我在“_id”属性的基础上比较两个对象时,我发现mongodb对象(BSON文档)和elasticsearch索引文档之间的所有唯一标识符字段都不同。

例如:

BSON DOCUMENT

{
    "_id" : ObjectId("51b9d8161fea325bc795dec9"),
    "CustomerId" : NUUID("ff9e4097-adec-4496-a007-007ef9fc6457"),
    "ProductId" : NUUID("1b5097fb-3577-4033-a3a2-c8b93379d0e0"),
    "CategoryId" : NUUID("7224f31a-abc3-40d0-9518-5d1e02605839"),
    "CustomHierarchyId" : NUUID("00000000-0000-0000-0000-000000000000"),
    "ContextualSKU" : null,
    "GTIN" : null,
    "Name" : "Bona Swedish Formula High Gloss Hardwood Floor Polish 24oz",
    "Volume" : 24,
    "VolumeMeasureId" : NUUID("3a3e4fd0-fa83-41a5-8974-e959552a5bf0"),
    "VolumeString" : "24oz",
    "BrandId" : NUUID("ae4cca92-8aff-4860-8ca8-5012d0fdd07a"),
    "ManufacturerId" : NUUID("fda57988-6728-4724-9f54-fd751041d609"),
    "Branded" : true,
    "SupplierId" : null,
    "ImageId" : NUUID("7a03bb08-0521-4fe1-88b8-14bdedaf5fe7")
}

被编入索引为

弹性搜索索引文档

{
_index: queryreadyproducts
_type: product
_id: 51b9d8161fea325bc795dec9
_version: 1
_score: 1
_source: {
_id: 51b9d8161fea325bc795dec9
CustomerId: 4496adec-ff9e-4097-5764-fcf97e0007a0
ProductId: 40333577-1b50-97fb-e0d0-7933b9c8a2a3
CategoryId: 40d0abc3-7224-f31a-3958-60021e5d1895
CustomHierarchyId: 00000000-0000-0000-0000-000000000000
ContextualSKU: null
GTIN: null
Name: Bona Swedish Formula High Gloss Hardwood Floor Polish 24oz
Volume: 24
VolumeMeasureId: 41a5fa83-3a3e-4fd0-f05b-2a5559e97489
VolumeString: 24oz
BrandId: 48608aff-ae4c-ca92-7ad0-fdd01250a88c
ManufacturerId: 47246728-fda5-7988-09d6-411075fd549f
Branded: true
SupplierId: null
ImageId: 4fe10521-7a03-bb08-e75f-afedbd14b888

} }

任何人都可以指出所犯的错误。

感谢您的帮助。

0 个答案:

没有答案