codeforboston / codeforboston/police-data-trust

[FEATURE] Add Search Parsing

Open
#484 0 comments 0 reactions 0 assignees View on GitHub
frontend
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.