Integer.text is no longer working in Kibana -7.9.2 for Query string query when the field is not an array

70 views Asked by At

I have below document been added in ElasticSearch 7.9.2 version.

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

I tried without adding .txt but it throws query_shard_exception, however after adding it, it doesn't show the correct result.

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

Please see the image . enter image description here

For array elements .text is working fine . Any answer or comment is appreciated and won't be down voted by me . Thank you . enter image description here

Output of GET school/

{
    "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"
            }
        }
    }
 }
0

There are 0 answers