Page 1 of 1

Inconsistent result - FindAddressByText

Posted: Mon Dec 19, 2016 12:12 pm
by biro.daniel
We have an issue in the xLocate app by finding address by text. (The address is „Valencia de Don Juan” in ES)
If „valencia de” is written in the Address field, the results contain the right location, but if „valencia de don” or „valencia de don juan” is added, the result will be Orihuela (city). This town totally differs from the target location, but there is a place in the town named Urbanización Castillo de Don Juan (city2).
If the post codes are added, the result is correct.
It seems when we query the result addresses the city2 field has larger weight.

How can we get the correct result?

Thank you in advance
BR
Daniel

Re: Inconsistent result - FindAddressByText

Posted: Mon Dec 19, 2016 3:41 pm
by bocajo
Hi Daniel

The xLocate identifies Valencia as a state ;) The first input word in the Address field is tried as a country or state.
There are two possibilities to get Valencia de Don Juan:
1. Write the country before Valencia "E Valencia de Don Juan"
2. Switch off the parameter Region.CheckState=0.
You can switch off CheckState in the file conf\native-default.xml (you have to restart the xLocate).
Or per request:

Code: Select all

{
  "address": "Valencia de Don Juan",
  "country": "E",
  "options": [
    {
      "$type": "NamedSearchOption",
      "value": "false",
      "param": "Region.CheckState"
    }
  ],
  "sorting": [],
  "additionalFields": [],
  "callerContext": {
    "properties": [
      {
        "key": "CoordFormat",
        "value": "PTV_MERCATOR"
      },
      {
        "key": "Profile",
        "value": "default"
      }
    ]
  }
}
Hopefully this will help you
Regards
Jochen
Edit by Jcl, added code tag for readability