橡皮、老虎皮、狮子皮哪一个最不好?

filter查询不到数据,字段值一样,mapping也没有发现什么不一样。

Elasticsearch | 作者 jybbh | 发布于2019年02月13日 | 阅读数:2686

mapping
-----------------------------
 
                  "cookies" : {
                    "properties" : {
                      "JSESSIONID" : {
                        "type" : "keyword",
                        "ignore_above" : 1024
                      },
                      "cee" : {
                        "type" : "keyword",
                        "ignore_above" : 10240
                      },
                      "ce.um.mag.user" : {
                        "type" : "keyword",
                        "ignore_above" : 10240
                      }
                    }
                  }, 
                  "url" : {
                    "properties" : {
                      "full" : {
                        "type" : "keyword",
                        "ignore_above" : 1024
                      },
                      "hostname" : {
                        "type" : "keyword",
                        "ignore_above" : 10240
                      },
                      "ab" : {
                        "type" : "keyword",
                        "ignore_above" : 10240
                      },
                      "pathname" : {
                        "type" : "keyword",
                        "ignore_above" : 1024
                      },
                      "port" : {
                        "type" : "keyword",
                        "ignore_above" : 1024
                      },
                      "protocol" : {
                        "type" : "keyword",
                        "ignore_above" : 1024
                      }
                    }
                  }
-----------------------------
使用 ab 可以查到数据,使用cee却查不到数据,请问是怎么回事?
 
 
  
 
TIM截图20190213104000.png TIM截图20190213104025.png
已邀请:

rochy - rochy_he

赞同来自: jybbh

enabled 为 false,则字段不支持搜索;需要设置为 true;
应该是索引模板里面定义了

jybbh - 80后IT男

赞同来自:

查询出来的mapping如下,为什么"cookies": 会有个属性值为"enabled": false,这个会影响我查询cee的内容吗?会的话要怎么改?enabled不是我加的啊,怎么会有呢
 
                            "request": {
                                "properties": {
                                    "body": {
                                        "type": "object",
                                        "enabled": false
                                    },
                                    "cookies": {
                                        "enabled": false,
                                        "properties": {
                                            "ce": {
                                                "properties": {
                                                    "um": {
                                                        "properties": {
                                                            "mag": {
                                                                "properties": {
                                                                    "user": {
                                                                        "type": "keyword",
                                                                        "ignore_above": 10240
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            },
                                            "cee": {
                                                "type": "keyword",
                                                "ignore_above": 10240
                                            }
                                        }
                                    },
                                    "env": {
                                        "type": "object",
                                        "enabled": false
                                    },
                                    "headers": {
                                        "type": "object",
                                        "enabled": false
                                    },
                                    "http_version": {
                                        "type": "keyword",
                                        "ignore_above": 1024
                                    },
                                    "method": {
                                        "type": "keyword",
                                        "ignore_above": 1024
                                    },
                                    "socket": {
                                        "type": "object",
                                        "enabled": false
                                    },
                                    "url": {
                                        "properties": {
                                            "ab": {
                                                "type": "keyword",
                                                "ignore_above": 10240
                                            },
                                            "full": {
                                                "type": "keyword",
                                                "ignore_above": 1024
                                            },
                                            "hash": {
                                                "type": "keyword",
                                                "ignore_above": 1024
                                            },
                                            "hostname": {
                                                "type": "keyword",
                                                "ignore_above": 10240
                                            },
                                            "pathname": {
                                                "type": "keyword",
                                                "ignore_above": 1024
                                            },
                                            "port": {
                                                "type": "keyword",
                                                "ignore_above": 1024
                                            },
                                            "protocol": {
                                                "type": "keyword",
                                                "ignore_above": 1024
                                            },
                                            "raw": {
                                                "type": "keyword",
                                                "ignore_above": 1024
                                            },
                                            "search": {
                                                "type": "keyword",
                                                "ignore_above": 1024
                                            }
                                        }
                                    }
                                }
                            },

要回复问题请先登录注册