Feature/Make fuzzy search optional #102
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is a draft of the UI side of the work to have search be exact by default with the option to toggle fuzzy search in the search modal. This should not be merged until the FES changes are deployed, I'm just opening the PR to a stable state so it can be picked up again
Changes
FileExplorerURL
parameterHere's what the shareable link would look like now:
fms-file-explorer://{"groupBy":[],"filters":[{"name":"uploaded","value":"RANGE(2023-05-13T07:00:00.000Z,2024-05-14T06:59:59.501Z)"},{"name":"file_name","value":"test"}],"fuzzyFilters":[{"annotationName":"file_name"}],"openFolders":[],"sort":{"annotationName":"uploaded","order":"DESC"}}
Which would generate the following url query:
from=0&limit=56&file_name=test&uploaded=RANGE(2023-05-13T07:00:00.000Z,2024-05-14T06:59:59.501Z)&sort=uploaded(DESC)&fuzzy=file_name
Testing
Tested manually with an EC2 instance of FES (the local version has the fuzzy search changes, but hasn't been deployed) and staging version of Mongo.
Updated unit tests
Screenshot