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

Improve fuzzy url matching throughout application #92

Open
3 tasks
u8sand opened this issue Oct 11, 2018 · 1 comment
Open
3 tasks

Improve fuzzy url matching throughout application #92

u8sand opened this issue Oct 11, 2018 · 1 comment

Comments

@u8sand
Copy link
Contributor

u8sand commented Oct 11, 2018

Might make sense to make a dedicated module and tests for this. Some ideal features of good URL matching:

  • url in search
  • search in url
  • try chopping out common differentiating parts of a url
    ^(?P<proto>.+?)://(?P<url>.+?)(\?(?P<server_vars>.+?))?(#(?P<client_vars>.+?))?$
@u8sand
Copy link
Contributor Author

u8sand commented Nov 6, 2018

In general, searches could be more efficient for things like this and more if we migrate our database to PostgreSQL and take advantage of its features. (https://docs.djangoproject.com/en/2.1/ref/contrib/postgres/search/#searchrank)

Another thing which could be done to help the search along is to explicitly split urls into their components:

import urllib
parsed_url = urllib.parse.urlparse(url)

urllib.parse.urlparse('http://me:[email protected]/hello/world?q=hi&b=bye#c=f')
# ParseResult(scheme='http', netloc='me:[email protected]', path='/hello/world', params='', query='q=hi&b=bye', fragment='c=f')

u8sand added a commit that referenced this issue Dec 11, 2018
u8sand added a commit that referenced this issue Apr 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant