在我的 symfony2 / 学说 2 应用程序中,运行 fos:elastica:populate 时出现错误:
[Elastica\Exception\Bulk\ResponseException]
一个或多个批量请求操作出错:
索引:/foodmeup/offer/4 导致 MapperParsingException[无法解析 [responsibilities]];嵌套:ElasticsearchIllegalArgumentException[未知属性 [0]];
我的配置如下,我已将 type: string 设置为责任,这实际上是一个学说 json 数组:
offer:
mappings:
name: { type: string, boost: 10}
content: { type: string }
responsibilities: { type: string }
skills:
type: "nested"
properties:
name: { type: string }
contractType:
type: "nested"
properties:
name: { type: string }
position:
type: "nested"
properties:
name: { type: string, boost: 10 }
我的实体映射:
/**
* @ORM\Column(type="json_array", nullable=false)
*/
protected $responsibilities = array();
我能做些什么来解决这个问题?我曾尝试使用“~”而不是“字符串”,但出现了同样的问题,当我删除责任的配置行时,它运行良好。
谢谢 !