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

Searching for stops with very simple names does not work properly #10

Open
senritsu opened this issue Oct 13, 2018 · 3 comments
Open

Searching for stops with very simple names does not work properly #10

senritsu opened this issue Oct 13, 2018 · 3 comments

Comments

@senritsu
Copy link

senritsu commented Oct 13, 2018

Due to a combination of issues some stops can't be reported by name search.

  • Only X items listed per result page, and no pagination option
  • The fuzzy search does not prioritize match quality/distance enough, leaving exact matches somewhere far down the list for shorter names that are also contained in a lot of other stop names

This leads to the correct stop not being listed in the results, and no way to paginate to it.

As a workaround location search can be used instead of name search.

@Chefkeks
Copy link
Member

Chefkeks commented Oct 15, 2018

This is due to the fact that we use %searchterm% instead of searchterm%.
But yes, that is an issue which we should get solved either by pagination or optimizing the search or both :)

EDIT:
Can you give an example search term and result list?

@senritsu
Copy link
Author

senritsu commented Oct 15, 2018

Without knowing specifics about the search used, just by similarity with SQL i would assume that searchterm% roughly equates to regex searchterm.* and only matches beginning of word with wildcard on the end, which would solve this problem somewhat but would also lead to lots of actual positive matches being discarded (with the term in the middle or end of the word). Not sure if this solution doesn't actually make things worse overall.

For a proper solution there is probably no way around either pagination (cumbersome but would make all options selectable) or a better search algorithm with an adjusted score/metric for match quality.

I will try to provide an example when i get home.

@senritsu
Copy link
Author

Example result for searchterm "Statue":

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