Receiving better results using SearchByTextRequest XLocate2

deals with geocoding and reverse geocoding
Post Reply
AlexanderL
Posts: 11
Joined: Wed Nov 20, 2019 8:27 am

Receiving better results using SearchByTextRequest XLocate2

Post by AlexanderL »

Hey,
I am using the “SearchByTextRequest” to receive location results.
Because of the small amount of results I receive sometimes, I was wondering what could be the best order for the parameter that I can insert as text (country, city, postcode, street …).
Will I receive better or different results using special characters (comma, semicolon, spaces …)?
I already tried different things e.g. using different variations for the Country: (D, DE, Deutschland and Germany).

The post for xLocate1 is helpful but did something changed in xLocate2? =)
"Knowhow SingleField Search / searchByText (xLocate 1)" - https://xserver.ptvgroup.com/forum/view ... =11&t=1036

Alex
User avatar
bocajo
Posts: 44
Joined: Tue Mar 01, 2016 3:05 pm

Re: Receiving better results using SearchByTextRequest XLoca

Post by bocajo »

The algorithm of xLocate2 works completly different from xLocate1. For the xLocate2 the input order doesn't matter and also special characters.
But it sounds that you sometimes don't get the correct results? If this is the case, can you please send as an example?
Jochen Anderer
Manager Engineer
PTV GROUP GERMANY
AlexanderL
Posts: 11
Joined: Wed Nov 20, 2019 8:27 am

Re: Receiving better results using SearchByTextRequest XLoca

Post by AlexanderL »

Hey bocajo.
Thank you for your post. =)
I have an example using "Bahnhofstraße" in different variations:
  • "Bahnhofstraße" => 4 results
  • "Bahnhofstr"/"Bahnhofstr." => 3 results (2x DE, 1x AT)
  • "D Bahnhofstr"/"DE Bahnhofstr"/"DEU Bahnhofstr" (Same results with dot) => 2 results (2x DE)
  • "Deutschland Bahnhofstr"/"Deutschland Bahnhofstr." (same results with "Germany" instead of "Deutschland") => 940 results
  • "Deutschland Bahnhofstraße" (same results with "Germany" instead of "Deutschland") => 2 results
(A full Request/Response log isn't necessary in my opinion.)

Alex
User avatar
bocajo
Posts: 44
Joined: Tue Mar 01, 2016 3:05 pm

Re: Receiving better results using SearchByTextRequest XLoca

Post by bocajo »

The xLocate stops searching for streets if all input words can be found as city or district. So Bahnhofstraße finds the 3 results exact and Bahnhofstr finds them as asterisk search. If you searching for Bahnofstraße it is find by fuzzy search.

xLocate is based on the assumption that the first input word up to 3 characters (D, DE and DEU) could be a country abbreviation. So xLocate finds for D (DE or DEU) Bahnhofstr the country exact and 2 districts asterisk.

With the input Deutschland Bahnhofstr xLocate doesn't make the assumption that Deutschland is a country. So xLocate searches for Deutschland and Bahnhofstr in country-, admin-, city- and street-level. And in addition Bahnhofstr is only the abbreviation of Bahnhofstraße on street- but not on city-level ;) So on street level Bahnhofstr is an exact match but not on city level and xLocate prefers exact matches over asterisk matches. And thats the reason why there are different results for the input D Bahnhofstr and Deutschland Bahnhofstr.

I hope this explanation helps you to understand better how the xLocate works.
Jochen Anderer
Manager Engineer
PTV GROUP GERMANY
Post Reply