codeforboston / codeforboston/police-data-trust
[FEATURE] Add Search Parsing
- Dominant language
- Python
- Stars
- 64
- Forks
- 102
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
When using the search bar, I would like to be able to apply filters using text queues that indicate what filters I'd like to apply. For example, if I enter the query "John Smith in:Texas" I want to results to include search results for "John Smith" that are located in Texas
**Describe the solution you'd like**
Add a function to the Search Provider which parses the search term for the following keywords:
- `in:` - Indicates a location filter
- `source:` - Indicates a source filter
If one of the keywords is found, the front end should begin suggesting potential locations or sources that can be used to filter the results.
When the search is finally performed, the Provider should send an API request to the search endpoint with the proper filters applied.
Notes:
- When the search results come back, the correct filters should be checked on the search results page.
- When a filter is applied via the check boxes, the text filter should be ignored?
Contributor guide
Assessment
This issue has not been assessed yet.