Skip to content

Conversation

@smallsaucepan
Copy link
Contributor

Implicitly double quoting before passing to mysql stops @whatever being mistaken for a fulltext search proximity operator.

Resolves #606

double quoting before passing to mysql stops @whatever being mistaken
for a fulltext search proximity operator. Resolves MLTSHP#606
# quotes first.
# More info: @distance fulltext search proximity operator
# https://dev.mysql.com/doc/refman/8.4/en/fulltext-boolean.html
q = re.sub(r'(?<!")(\B@[\w\-]+)(?!")', r'"\1"', q)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be done in lib.utilities.clean_search_term?

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.

@ (at symbol) throws error in searches

2 participants