integer.text在kibana-7.9.2中不再用于查询字符串查询

lx0bsm1f  于 2021-06-14  发布在  ElasticSearch
关注(0)|答案(0)|浏览(185)

我已经在elasticsearch 7.9.2版本中添加了以下文档。

{
    "EmployeeID": 222,
    "EmpName": "Lisa jay",
    "Age": 33,
    "Address": [{
        "AddressNo": 1290,
        "Street": "Park flower road",
        "ZIPCODE": 700
    }]
}

我尝试不添加.txt,但它抛出query\u shard\u异常,但是添加后,它没有显示正确的结果。

GET school/_search
{
  "query": {
    "query_string": {
    "fields": ["EmployeeID.text","Address.ZIPCODE.text"],
    "query": "222  700",
    "default_operator":"OR"
    }
  }
}

请看图片。

对于数组元素。文本工作正常。任何回答或评论都将不胜感激,不会被我否决。谢谢您。

get学校产出/

{
    "school": {
        "aliases": {},
        "mappings": {
            "properties": {
                "Address": {
                    "properties": {
                        "AddressNo": {
                            "type": "long"
                        },
                        "Street": {
                            "type": "text",
                            "fields": {
                                "keyword": {
                                    "type": "keyword",
                                    "ignore_above": 256
                                }
                            }
                        },
                        "ZIPCODE": {
                            "type": "long"
                        }
                    }
                },
                "Age": {
                    "type": "long"
                },
                "EmpName": {
                    "type": "text",
                    "fields": {
                        "keyword": {
                            "type": "keyword",
                            "ignore_above": 256
                        }
                    }
                },
                "EmployeeID": {
                    "type": "long"
                },
                "query": {
                    "properties": {
                        "match": {
                            "properties": {
                                "phrase": {
                                    "properties": {
                                        "ZIPCODE": {
                                            "type": "long"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "t1": {
                    "properties": {
                        "properties": {
                            "properties": {
                                "address": {
                                    "properties": {
                                        "type": {
                                            "type": "text",
                                            "fields": {
                                                "keyword": {
                                                    "type": "keyword",
                                                    "ignore_above": 256
                                                }
                                            }
                                        }
                                    }
                                },
                                "age": {
                                    "properties": {
                                        "type": {
                                            "type": "text",
                                            "fields": {
                                                "keyword": {
                                                    "type": "keyword",
                                                    "ignore_above": 256
                                                }
                                            }
                                        }
                                    }
                                },
                                "id": {
                                    "properties": {
                                        "type": {
                                            "type": "text",
                                            "fields": {
                                                "keyword": {
                                                    "type": "keyword",
                                                    "ignore_above": 256
                                                }
                                            }
                                        }
                                    }
                                },
                                "name": {
                                    "properties": {
                                        "type": {
                                            "type": "text",
                                            "fields": {
                                                "keyword": {
                                                    "type": "keyword",
                                                    "ignore_above": 256
                                                }
                                            }
                                        }
                                    }
                                },
                                "partime": {
                                    "properties": {
                                        "type": {
                                            "type": "text",
                                            "fields": {
                                                "keyword": {
                                                    "type": "keyword",
                                                    "ignore_above": 256
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "settings": {
            "index": {
                "creation_date": "1602337657007",
                "number_of_shards": "1",
                "number_of_replicas": "1",
                "uuid": "9RNUa1gOQ7WrpNoK_KifLA",
                "version": {
                    "created": "7090299"
                },
                "provided_name": "school"
            }
        }
    }
 }

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题