【发布时间】:2014-02-28 16:15:57
【问题描述】:
我在 config.yml 中创建了一个弹性搜索映射,它使用了学说 orm,问题是当我创建一个新文档时,索引会自动填充最顶层的对象,即“文档”,而不是任何子对象诸如“文件夹,作者,评论...”之类的对象,有人可以建议我是否缺少任何标志或任何设置。下面是我的 Elastica 配置:
# Elastica Configuration
fos_elastica:
clients:
default: { host: localhost, port: 9200 }
indexes:
website:
client: default
index_name: docova
types:
documents:
mappings:
Doc_Title: ~
Description: ~
Date_Created: ~
Doc_Status: ~
Keywords: ~
folder:
type: "object"
properties:
id: ~
Library:
type: "object"
properties:
id: ~
Author:
type: "object"
properties:
username: ~
Comments:
type: "object"
properties:
comment: ~
Form_Values:
type: "object"
properties:
Field_Value: ~
Bookmarks:
type: "object"
properties:
Target_Folder:
type: "object"
properties:
id: ~
DocType:
type: "object"
properties:
id: ~
Doc_Name: ~
Attachments:
type: "object"
properties:
File_Name:
content:
type: attachment
persistence:
driver: orm
model: Docova\DocovaBundle\Entity\Documents
provider: ~
listener: ~
finder: ~
谢谢。
【问题讨论】: