alan-turing-institute / alan-turing-institute/AutSPACEs

Decide on search strategy

Open
#503 5 comments 0 reactions 2 assignees Claimed by @obinnaofomah View on GitHub
Dominant language
Python
Stars
43
Forks
17
PR merge metrics
No merged PRs in 30d

Description

### Summary
A functional search function is implemented in `list_public_experiences` in `views.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:
> My family recently got a new TV.

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

- [ ] Decide on a couple of key features (suggested above)
- [ ] Update function
- [ ] Apply function to other areas of code that use search (perhaps move to helper function)

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.