Validation of [here-rest] not working properly

Viewed 48

I would like to verify adresses via HERE MAps.

I use the geocoder API and the adress I give in as input is correct: "country": "Germany", "zipCode": "59320", "city": "Ennigerloh-Ostenfelde", "street": "Hessenknapp", "houseNumber": "43",

BUT the response indicates that here maps is not sure (given the relevance of 0.76). Request: https://geocoder.api.here.com/6.2/geocode.json?searchtext=Ennigerloh-Ostenfelde+59320+DE+Hessenknapp+43&app_code=XXX=8&app_id=XXX Response:

{
"Response": {
    "MetaInfo": {
        "Timestamp": "2020-02-26T11:04:59.985+0000"
    },
    "View": [
        {
            "_type": "SearchResultsViewType",
            "ViewId": 0,
            "Result": [
                {
                    "Relevance": 0.76,
                    "MatchLevel": "houseNumber",
                    "MatchQuality": {
                        "Country": 1.0,
                        "City": 1.0,
                        "Street": [
                            1.0
                        ],
                        "HouseNumber": 1.0,
                        "PostalCode": 1.0
                    },
                    "

I need to define a smart business rule so I want to understand.

So how can the relevance be at 0.76 if ALL attributes below are 1.0?

What should I do in regards to my implementation?

1 Answers

Relevance is a precentage value ranging from 0 to 1 representing the percentage of the input that matches the returned address. "1" means that all input tokens were matched and there was no typo or any other difference.

  • If the input query contains any additional information – name of the person, phone number or a hint to ring twice – the relevance will be low, but the address returned may be correct.
  • Low relevance may indicate that the Geocoder API was not able to match some relevant part of the address in the input query.
  • To separate the above cases one may look at match quality of the fields. These values show how well each of the address elements (e.g. street, city, country etc.) in the results matched to the input that was provided. If all the fields that are important for addressing in the country were matched with high match quality, one can assume that relevance is low because of the additional non-address information. And the result is still highly confident.
Related