1
votes

I just deployed a small application that loads a few thousand docs into an index and when working with production data i get an error in my search request.

http code is 400 and the error is

{
    "error": {
        "root_cause": [
            {
                "type": "number_format_exception",
                "reason": "empty String"
            }
        ],
        "type": "number_format_exception",
        "reason": "empty String"
    },
    "status": 400
}

Okay i kind of get it that my mapping defines some numeric field which i oviously dont store correctly, but how am i supposed to find that field?

each doc contains hundereds of fields.... i mean, really?

I tried looking in /var/log/elasticsearch but nothing useful there...

Please help me i need to get the thing going

I defined my fields as integer which should hold arrays and might be empty. Could that be a problem?

My ES Version is 6.6.0

Update:

The error does occur while searching, during index all is fine

My mapping for that index:

{
    "development-object-1551202425": {
        "mappings": {
            "_doc": {
                "dynamic": "false",
                "properties": {
                    "accommodation": {
                        "properties": {
                            "badges": {
                                "properties": {
                                    "maskedProp1": {
                                        "type": "boolean"
                                    },
                                    "maskedProp2": {
                                        "type": "boolean"
                                    },
                                    "maskedProp3": {
                                        "type": "boolean"
                                    },
                                    "maskedProp4": {
                                        "type": "boolean"
                                    },
                                    "maskedProp5": {
                                        "type": "boolean"
                                    },
                                    "maskedProp6": {
                                        "type": "boolean"
                                    }
                                }
                            },
                            "businessTypes": {
                                "type": "integer"
                            },
                            "classification": {
                                "properties": {
                                    "classification": {
                                        "type": "keyword"
                                    },
                                    "classificationValue": {
                                        "type": "short"
                                    }
                                }
                            },
                            "endowments": {
                                "type": "integer"
                            },
                            "hasPrice": {
                                "type": "boolean"
                            },
                            "lowestPrice": {
                                "type": "float"
                            },
                            "metascore": {
                                "type": "short"
                            },
                            "rating": {
                                "type": "short"
                            },
                            "regionscore": {
                                "type": "short"
                            }
                        }
                    },
                    "certificates": {
                        "type": "integer"
                    },
                    "geoLocation": {
                        "type": "geo_point"
                    },
                    "id": {
                        "type": "text"
                    },
                    "isAccommodation": {
                        "type": "boolean"
                    },
                    "location": {
                        "properties": {
                            "maskedProp1": {
                                "type": "integer"
                            },
                            "maskedProp2": {
                                "type": "integer"
                            },
                            "id": {
                                "type": "integer"
                            },
                            "name": {
                                "type": "text",
                                "fielddata": true
                            },
                            "zipcodes": {
                                "type": "integer"
                            }
                        }
                    },
                    "maskedProp1": {
                        "type": "integer"
                    },
                    "maskedProp2": {
                        "type": "integer"
                    },
                    "description": {
                        "type": "text"
                    },
                    "sortTitle": {
                        "type": "keyword"
                    },
                    "title": {
                        "type": "text"
                    }
                }
            }
        }
    }
}

The name consists of an environment string (development) and a timestamp appended (i work with automatic index switching and query for the alias, that does is called {env}-{name}-current.

1
Do you get this error when searching or indexing the data? Also provide the outcome of _mapping api for your index. - Amit
Hi! I added the mapping config to the original post. The error occurs while searching. - Philipp Wrann
can u also provide ur search query? - Amit
I found the error in my dsl, the size parameter was set with an empty string. - Philipp Wrann

1 Answers

0
votes

In my case the error was an empty "size" parameter in the query, i tried to find the error in my filters and did not see that...

A more verbose error message (at least at what property or setting the error occured) could save thousands of hours of debugging all around the world i guess xD.

For now you would have to take apart your dsl section by section to find the issue.