当前位置: 首页 > 知识库问答 >
问题:

更新映射不适用于我的索引(elasticsearch 1.4)

湛钊
2023-03-14

当我尝试更新我的索引,并添加一个从方法copy_to创建的新字段(见http://pastebin.com/T7GcHSXj)时,我得到了这个我不明白的错误:

“error”:“MapperParsingException[解析后根类型映射不为空!其余字段:[映射:{tInfoclient={properties={Client={properties={d\u naiss\u cli={type=string,copy\u to=full\u info},pr\u cli 20={type=string,copy\u to=full\u info},nom\u cli 20={type=string,copy\u to=full\u info},full\u info={type=string},dc\u cli={format=DateOptional时间,type=date},no\u coEmprunteur={type=string},cmpl\U voie\U cli={type=string},loc\U cli={type=string},no\U tel\U cli={type=string},no\U ctrat={type=string},no\U empcli={type=string},voie\U cli={type=string},c\U post\U cli={type=string},c\U qual={type=string},ad\U e mail={type=string},no\U telp={type=string字符串},ptel\u empcli={type=string}}}}}}]>,“status”:400}

我从网站上留档但没有线索https://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-put-mapping.htmlhttps://www.elastic.co/guide/en/elasticsearch/guide/1.x/custom-all.html

共有1个答案

赫连照
2023-03-14

更新映射类型时,需要删除映射部分和类型名称,因为URL中已经指定了这些内容:

curl -XPUT 'http://maprvm:9200/maprdb/_mapping/tInfoclient' -d '{
            "properties": {
                "Client": {
                    "properties": {
                        "d_naiss_cli": {
                            "type": "string",
                            "copy_to":  "full_info"
                        },
                        "pr_cli_20": {
                            "type": "string",
                            "copy_to":  "full_info"
                        },
                        "nom_cli_20": {
                            "type": "string",
                            "copy_to":  "full_info"
                        },
                        "full_info": {
                            "type":     "string"
                        },
                        "dc_cli": {
                            "format": "dateOptionalTime",
                            "type": "date"
                        },
                        "no_coEmprunteur": {
                            "type": "string"
                        },
                        "cmpl_voie_cli": {
                            "type": "string"
                        },
                        "loc_cli": {
                            "type": "string"
                        },
                        "no_tel_cli": {
                            "type": "string"
                        },
                        "no_ctrat": {
                            "type": "string"
                        },
                        "no_tel_empcli": {
                            "type": "string"
                        },
                        "voie_cli": {
                            "type": "string"
                        },
                        "c_post_cli": {
                            "type": "string"
                        },
                        "c_qual": {
                            "type": "string"
                        },
                        "ad_e_mail": {
                            "type": "string"
                        },
                        "no_telp": {
                            "type": "string"
                        },
                        "ptel_empcli": {
                            "type": "string"
                        }
                    }
                }
            }

}'
 类似资料:
  • 我对弹性搜索一无所知。所以,如果这是一个愚蠢的问题,请原谅我,我的问题可能已经在其他地方得到了回答,但我找不到。我想使用弹性搜索作为我的网络中PDF和docx的搜索引擎。我使用fscrawler将PDF文件吸收到弹性搜索中。因为我要摄取的文档是几种语言的,所以我想使用n-graming进行词干分析。为此,我想像这样更新我的映射 现在我收到了这个错误信息 {“error”:{“root_cause”

  • 我想为我的索引更新elasticsearch中的默认映射。但是所有的文档都指出我们必须为更新映射提供类型。问题是我有很多索引类型,它们是动态创建的,就像新类型的文档出现时一样。所以最好的处理方法是默认映射类型。因为我不必为每个类型定义映射。但现在我无法更新我的索引默认映射。如果可能的话,请告诉我?

  • 如何从字符串列表中获取映射,其中索引是键,字符串是值? 如果我有这样的名单 我想要一张< code >地图 当我执行以下操作时,我得到一个错误 错误 所需类型:int提供:Object 当我将其转换为int或Integer时 我明白了 收集(java.util.function.Supplierjava.util.function.ObjIntConsumerjava.util.function.

  • 我正在开发一个SpringBoot项目,其中有@RestController和FilterRegistrationBean。我添加的过滤器可以工作,但是在@RestController和@RequestMapping中配置的url不能工作。当我请求url时,响应代码是200,但是没有显示任何内容。当我移除过滤器时,RequestMapping工作正常。为什么?(我访问的网址是http://loca

  • 问题内容: 我打开控制台(chrome \ firefox)并运行以下行: 内容未包含在#popupFrame中,这使它变得很奇怪。 目标是创建像firefox这样的警告框 问题答案: 第二个div是(默认值),因此z-index不适用于它。 您需要定位(将位置属性设置为,而不是在这种情况下可能需要的其他位置)要分配给的任何内容。

  • 问题内容: 我有一个默认位置(即)和一个位置。 如果设置元素的z索引,似乎不可能使固定元素位于静态元素之后。 我可以通过 在static元素上使用来解决此问题 ,但是有人可以告诉我 为什么会 这样吗? (似乎有一个与此问题类似的问题,固定位置破坏了z-index,但是它没有令人满意的答案,因此我在这里用示例代码来询问) 问题答案: 这个问题可以通过多种方式解决,但实际上,了解堆叠规则可以使您找到最