Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect result order for autocomplete #1279

Closed
Joxit opened this issue Apr 16, 2019 · 3 comments
Closed

Incorrect result order for autocomplete #1279

Joxit opened this issue Apr 16, 2019 · 3 comments

Comments

@Joxit
Copy link
Member

Joxit commented Apr 16, 2019

I found an inconsistent result for autocomplete (I think it's since 3.58.0).

When I search 160 avenue aristide briand bagneux, the exact match is on second position instead of the first one.

  1. 160 Avenue Marx Dormoy, Bagneux, France
  2. 160 Avenue Aristide Briand, Bagneux, France
  3. 152/160 Avenue Aristide Briand - CS 80013, Bagneux, France
  4. 160th Avenue, Prairie Creek Township, IL, USA
  5. 160th Avenue, Rapid City East, SD, USA
  6. 160th Avenue, Winnebago, IA, USA
  7. 160th Avenue, comté de Warren, IA, USA
  8. 160th Avenue, Ringgold, IA, USA
  9. 160th Avenue, comté de Des Moines, IA, USA
  10. 160th Avenue, Eliza Township, IL,

It works well for 3.57.0

Should we re sort results before sending them ?

@orangejulius
Copy link
Member

orangejulius commented Apr 17, 2019

Hey @Joxit,
This is a good test case.

I think this is more caused by addressit, which thinks that avenue always comes at the end of a street name. This behavior has been in there for a while as far as I know, so I don't think this is new.

Here's the parser output:

"parsed_text": {
  "street": "160 avenue",
  "regions": [
    "aristide briand bagneux"
  ]
},

It's therefore trying to use aristide briand as part of the admin area boosts, which doesn't do anything. If you put a comma in the right place to help the address parsing out, everything works:

/v1/autocomplete?text=160 avenue aristide briand, bagneux

I'd rather not go down the re-sorting path for autocomplete, but I do think it's time for revisiting what parsing logic (if any) the autocomplete endpoint uses so that we can fix this case

@Joxit
Copy link
Member Author

Joxit commented Apr 17, 2019

In fact, this works well in our production server (result here) which is in v3.53.0.

160 Avenue Aristide Briand, Bagneux, France is still in first position on our server and Marx Dormoy in second even if aristide briand bagneux is in the region part with addressit.

👍 for the parsing logic 😄

orangejulius added a commit to pelias/acceptance-tests that referenced this issue Apr 26, 2019
@orangejulius
Copy link
Member

This is (finally) fixed as of #1287 and the new Pelias parser!! 🎉

/v1/autocomplete?text=160 avenue aristide briand bagneux
Screenshot_2019-10-03_16-23-03

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants