问题
I try using Here-AutoSuggest API. In the documentation there is this query (Pariser+1+Berl):
http://autocomplete.geocoder.api.here.com/6.2/suggest.json
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&query=Pariser+1+Berl
Which returns exactly as it should.
BUT if I try to search for Berl+Pariser+1 I get zero results. How does the ordering work?
回答1:
The problem is due to placing incomplete words in between the query. The autocomplete api tries to do a exact match with Berl and hence becomes unsuccessful(no results). Making the query as Berlin+Pariser+1 or Berlin+1+Paris gives expected results. The autocomplete api provided for freemium currently doesn't exactly match the autocomplete provided in wego.here.com(where placing incomplete words inbetween also works!). Its also recommended to follow the following format in the query - house number, street name, city and county names (you can drop off any). Hope this helps. Happy Coding!
回答2:
Let me make a small correction. It is not that the API for Freemium is different than the one used by wego.here.com. It is that you are using the geocoder autocomplete API whereas wego.here.com is using the places autocomplete (autosuggest) API. Both are available to Freemium users. If you are interested in using it, the places autosuggest API is documented at https://developer.here.com/documentation/places/topics_api/resource-autosuggest.html
来源:https://stackoverflow.com/questions/54036583/here-api-order-of-search-query-seems-to-matter