elasticsearch 索引类型。从KeystoneJS到弹性搜索的关系值
我是KeystoneJs新手,我想使用Mongoostic在elasticsearch中为
elasticsearch 索引类型。从KeystoneJS到弹性搜索的关系值,
elasticsearch,mongoose,keystonejs,mongoosastic,
elasticsearch,Mongoose,Keystonejs,Mongoosastic,我是KeystoneJs新手,我想使用Mongoostic在elasticsearch中为类型.Relationship建立索引。问题在于类型的Mongo数据。关系存储为objectID数组,而不是实际关系的值,因为每个对象可能有多个(请参见下面的类别和平台) { "_id" : ObjectId("56d49e8ebe469b9614119259"), "slug" : "philips-hue", "title" : "Philips Hue", "categ
类型.Relationship
建立索引。问题在于类型的Mongo数据。关系存储为objectID数组,而不是实际关系的值,因为每个对象可能有多个(请参见下面的类别和平台)
{
"_id" : ObjectId("56d49e8ebe469b9614119259"),
"slug" : "philips-hue",
"title" : "Philips Hue",
"categories" : [
ObjectId("56d4a03abe469b961411925a"),
ObjectId("56d4a047be469b961411925b")
],
"state" : "published",
"__v" : 3,
"author" : ObjectId("56d499ad995a533813adef63"),
"publishedDate" : ISODate("2016-02-29T13:00:00.000Z"),
"manufacturer" : ObjectId("56d5eeec1ffcbb0517f07e1b"),
"platform" : [
ObjectId("56d5ee0ab85dbdf916007009"),
ObjectId("56d5ee37b85dbdf91600700a"),
ObjectId("56d5ee34uj3i223io23h2394")
]
}
platform
的这些ObjectId
s的格式如下:
{
"_id" : ObjectId("56d5ee0ab85dbdf916007009"),
"key" : "homekit",
"name" : "Homekit",
"__v" : 0
}
是否有人能让我选择正确的路径,添加到引用对象的弹性搜索索引name
?我也面临同样的问题。您的问题解决了吗?