Page 1 of 1

No results with incorrect state

Posted: Tue May 17, 2016 8:46 am
by Benjaminabat
When calling findAddress[es] with an incorrect state name no result is returned.
For example if I have the address:

Code: Select all

"addr": {
    "country": "D",
    "postCode": "",
    "city": "Münster",
    "city2": "",
    "state" : "Nrth Rhine-Westfalia",
    "street": "",
    "houseNumber": ""
  },
I get no result. However if the state is omitted several results are shown.
Why is the state not discarded by the xLocate Server if it can not be found?

Re: No results with incorrect state

Posted: Tue May 17, 2016 1:21 pm
by bocajo
There is a paramater called Region.CheckState it is set true per defaul because for some countries the state information. But there is no fuzzy or phonetic search for a state input.
There are two ways to swich off the parameter Region.CheckState.

1. In the config file (.\xlocate-x64-1.22.0.1\conf\native-default.xml)
- shut down the xLocate
- copy the native-default.xml and set the paramater <Region.CheckState Value="0" Type="bool"/>
- choose a new config nama e.g. native-xyz.xml
- start the xLocate
- send the following request:

Code: Select all

{
  "addr": {
    "country": "D",
    "state": "Nrdrhein-Westfalen",
    "postCode": "",
    "city": "Münster",
    "city2": "",
    "street": "",
    "houseNumber": ""
  },
  "options": [],
  "sorting": [],
  "additionalFields": [],
  "callerContext": {
    "properties": [
      {
        "key": "CoordFormat",
        "value": "PTV_MERCATOR"
      },
      {
        "key": "Profile",
        "value": "xyz"
      }
    ]
  }
}
2. By request:

Code: Select all

{
  "addr": {
    "country": "D",
    "state": "Nrdrhein-Westfalen",
    "postCode": "",
    "city": "Münster",
    "city2": "",
    "street": "",
    "houseNumber": ""
  },
  "options": [{
    "$type": "NamedSearchOption",
    "param": "Region.CheckState",
    "value": "0"
  }],
  "sorting": [],
  "additionalFields": [],
  "callerContext": {
    "properties": [
      {
        "key": "CoordFormat",
        "value": "PTV_MERCATOR"
      },
      {
        "key": "Profile",
        "value": "default"
      }
    ]
  }
}
Edit by Joost: added code tags for readability

Re: No results with incorrect state

Posted: Wed May 18, 2016 3:08 pm
by Benjaminabat
Thank you for your reply! This doesn't help me with my usecase though. Maybe I have to elaborate...

I am trying to verify a list of addresses out of a SAP system. The state in these addresses is represented by a number corresponding to a check table. This check table is language dependant and contains the names of the regions for the specified number. Some of the names in that table are false, because the name field is only 20 characters long or because of other mistakes (Westfalia/Westphalia).
Now I would like to send as much information as possible to the xLocate server. So in my case the best scenario would be, that if I send an incorrect state it is ignored. Making my own table with the correct state names seems a bit overkill to me.

If there would be an option to ignore the state conditionally that would be great!

Re: No results with incorrect state

Posted: Thu May 19, 2016 2:30 pm
by bocajo
So far I know there is no option on server side to ignore the state conditionally. So I guess you have to solve it on client side.

Definitely I recomment to clean up your table and try to match it with the PTV state names.

Re: No results with incorrect state

Posted: Wed May 25, 2016 12:44 pm
by Bernd Welter
Hello together,

I forwarded the approach of a server side switch to product management.
But: as this has not been demanded by many customers so far the priority
is not at the highest level. Just to be transparent.

Best regards Bernd