ElasticSearch RoutingMissingException [英] ElasticSearch RoutingMissingException

查看:797
本文介绍了ElasticSearch RoutingMissingException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



[Elastica \Exception\ResponseException]
RoutingMissingException [路线选择需要[myindex] / [评论] / [12345]]



摘录类型conf:

 文章:
_source:
启用:false
映射:
...

注释:
_source:
启用:false
_parent:
类型:文章
属性:article_id
标识符:id
_routing:
必需:true
path:article_id
mappings:
article:
type:long
index:not_analyzed
...

不明白我在这里遗失了什么...



使用Symfony2.3,FOSElasticaBundle 3.0,ElasticSearch 1.2.2

解决方案

在mappin中有错字gs。

 评论:
映射:
article_id:& - - 是article
类型:long
索引:not_analyzed

也许这有助于某人:)


I'm trying to populate objects having parent-child relation, but get an error:

[Elastica\Exception\ResponseException] RoutingMissingException[routing is required for [myindex]/[comment]/[12345]]

Excerpt from type conf:

article:
    _source:
        enabled: false
    mappings:
        ...

comment:
    _source:
        enabled: false
    _parent:
        type: article
        property: article_id
        identifier: id
    _routing:
        required: true
        path: article_id
    mappings:
        article:
            type: long
            index: not_analyzed
        ...

Cant understand what I am missing here....

I'm using Symfony2.3, FOSElasticaBundle 3.0, ElasticSearch 1.2.2

解决方案

Had typo in mappings.

comment:
    mappings:
        article_id: <-- was "article"
            type: long
            index: not_analyzed

Maybe this helps someone :)

这篇关于ElasticSearch RoutingMissingException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆