Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Replace regex characters in fuzzy match #15

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jbuckner
Copy link
Owner

@jbuckner jbuckner commented Jul 12, 2021

When we do a fuzzy match, ie venue:(foo fest [bar stage]) we need to remove any regex characters from the string or else the search engine throws a regex error. We will now replace the [ and ] with "[" and "]". The final query string will be venue:(foo fest "["bar stage"]").

When we do a fuzzy match with parentheses, ie `venue:(*brooklyn bowl*)` we need to remove any regex characters from the string or else the search engine throws a regex error. So if we have a search like `venue:(boop[foo])` we will now replace the [] with "[" and "]"
@codecov
Copy link

codecov bot commented Jul 12, 2021

Codecov Report

Merging #15 (c0f071d) into master (04d1c66) will increase coverage by 0.07%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #15      +/-   ##
==========================================
+ Coverage   97.90%   97.97%   +0.07%     
==========================================
  Files          10       10              
  Lines         381      395      +14     
==========================================
+ Hits          373      387      +14     
  Misses          8        8              
Impacted Files Coverage Δ
InternetArchiveKit/InternetArchiveQuery.swift 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 04d1c66...c0f071d. Read the comment docs.

@jbuckner jbuckner changed the title Replace regex characters in fuzzy match WIP: Replace regex characters in fuzzy match Jul 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant