-
Notifications
You must be signed in to change notification settings - Fork 18
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
Decide on search strategy #503
Comments
A potentially "easy" solution for the MVP might be switching to the fulltext-search functions that Django provides for Postgres, c.f. https://docs.djangoproject.com/en/4.2/topics/db/search/#postgresql-support I haven't tried it but based on the documentation there it seems like this might already better than limiting ourselves to case-insensitive matches. It will still probably not great compared to some more specialized search solutions, but it looks like this solution should at least come for free with what we have? |
100% agree |
We discussed that this might be a fun little project for an intern that will start in July and which could be expanded to include more advanced search (e.g. using an NLP framework that includes search for synonyms). |
@helendduncan In our co-working we were wondering if this should go into "on hold" or "todo" for the MVP refinements and could not decide, partially as we weren't sure how much progress on this was already made. What's your opinion? 🙂 |
I think there are some ideas in Obinnas branch using the Postgres search which I think could simply be appended to the filtered query set - Will do a quick proof of concept and update this post |
Summary
A functional search function is implemented in
list_public_experiences
inviews.py
At the moment the search returns results only for exact matches in the story, difference, or title text.
So for the story that begins:
Searching for family or TV or recently got will return the story. As will searching for got a new.
However searching for family TV will not return any results.
This is perhaps unexpected behaviour given how most search engines return results
Deadline
July 2023
What needs to be done?
Refactor the function - possible suggestion to assume the search function is a space separated list and iterate. Also deal with phrases within quotation marks as exact matches
I think this runs a risk of being over-engineered so I think perhaps ensuring that all the examples given in the summary would return the story is a sensible stopping point.
Who can help?
Updates
The text was updated successfully, but these errors were encountered: