freelawproject / courtlistener

A fully-searchable and accessible archive of court data including growing repositories of opinions, oral arguments, judges, judicial financial records, and federal filings.
https://www.courtlistener.com
Other
548 stars 150 forks source link

Fix user's search query when proximity search has a space #2965

Open mlissner opened 1 year ago

mlissner commented 1 year ago

If a user does this:

"my phrase" ~7

They meant to do this:

"my phrase"~7

Fix that for them. This could be done on the back end only, but I'm a fan of fixing queries and returning the fixed query to the user.

albertisfu commented 2 months ago

Should we fix the query here and only display the corrected version in the search box. Or should we preserve the original query in the search box and simply notify users about the corrected query used to return results, similar to how we handle missing citations?

mlissner commented 2 months ago

We should just fix it for them and we don't even need to tell them we did.