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

Exact Search Match should be easier to find #76

Closed
gtalarico opened this issue Feb 9, 2017 · 6 comments
Closed

Exact Search Match should be easier to find #76

gtalarico opened this issue Feb 9, 2017 · 6 comments
Assignees

Comments

@gtalarico
Copy link
Owner

gtalarico commented Feb 9, 2017

If a user search Wall Class search will return Face Wall StructuralWall and many others that include the words Wall and Class.

The entry that matches the query 100%, perhaps should be given a higher priority and pushed to the top.
(especially considering the query might have been assisted by autocomplete, it means there is a high chance that the exact match is what the user was looking for.

image

@gtalarico gtalarico self-assigned this Feb 9, 2017
@bjlee23
Copy link

bjlee23 commented Feb 9, 2017

yeaaaaaaaaaa!

@gtalarico
Copy link
Owner Author

image

@gtalarico
Copy link
Owner Author

gtalarico commented Feb 9, 2017

Implementation idea:
https://github.com/gtalarico/revitapidocs/blob/master/app/utils.py#L83
pass raw query instead "processed_query" to search_db()

while looping, add a re.match (flag ignore case) to check if an exact match is found. Add those to beggining of list instead of appending.

On front/js side, when creating DOM elements, check if query matches heading, if it does, apply a css class that will make those items stand out at the top

Ensure there is not significant performance decrease by running the search benchmark test
before and after
https://github.com/gtalarico/revitapidocs/blob/master/tests/benchmark.py

@gtalarico
Copy link
Owner Author

Implemented ongit
fff3918
and
9f12bc8

@gtalarico
Copy link
Owner Author

gtalarico commented Feb 10, 2017

Exact match is raise and "bold"
http://www.revitapidocs.com/2015/?query=Wall%20Class#searchModal

image

@bjlee23
Copy link

bjlee23 commented Feb 10, 2017 via email

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

2 participants