Php Elastica\Exception\ResponseException,消息为NoShardAvailableActionException[[index][0]null]
我正在使用php elastica client()在elasticsearch索引中添加文档 发生的情况是,我第一次尝试添加文档时,出现以下错误: 带有消息的“Elastica\Exception\ResponseException” 'NoSharedAvailableActionException[[index][0]null]; 嵌套:illegalindexhardstateException[[index][0] 仅在以下情况下才允许CurrentState[恢复]操作 启动/重新定位 文档不会添加到索引中,但会创建其映射 在这之后,它工作正常,文档被添加到索引中。 也许(相当肯定)我做错了什么。请帮我解决这个问题 以下是我的yaml配置:Php Elastica\Exception\ResponseException,消息为NoShardAvailableActionException[[index][0]null],php,
elasticsearch,elastica,Php,
elasticsearch,Elastica,我正在使用php elastica client()在elasticsearch索引中添加文档 发生的情况是,我第一次尝试添加文档时,出现以下错误: 带有消息的“Elastica\Exception\ResponseException” 'NoSharedAvailableActionException[[index][0]null]; 嵌套:illegalindexhardstateException[[index][0] 仅在以下情况下才允许CurrentState[恢复]操作 启动/重新定
indexes:
myIndex:
client: default
types:
myType:
mappings:
id: {type: integer, index: not_analyzed}
name: {type: string, index: not_analyzed}
location: {type: geo_point}
下面是我如何添加文档的:
$doc = new \Elastica\Document();
$doc->setData($arrDoc);
$doc->setId($id);
$objType->addDocument($doc); //object of \Elastica\Type