Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Search: Add prefix matching support #412

Merged
merged 4 commits into from
Dec 2, 2015
Merged

Search: Add prefix matching support #412

merged 4 commits into from
Dec 2, 2015

Conversation

erikjohnston
Copy link
Member

No description provided.

that can be passed to `to_tsquery(..)` postgres func. We use this so that
we can add prefix matching, which isn't something `plainto_tsquery` supports.
"""
results = re.findall(r"([\w\-]+)", search_term, re.UNICODE)
Copy link
Contributor

Choose a reason for hiding this comment

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

For the benefit of us who aren't familiar with regexeps it might be worth explaining what this code is doing.

Also since it is duplicated with the for sqlite below it might be worth lifting it out of these functions and moving it to the call site.

@erikjohnston
Copy link
Member Author

@NegativeMjark How about that?

@NegativeMjark
Copy link
Contributor

LGTM

erikjohnston added a commit that referenced this pull request Dec 2, 2015
Search: Add prefix matching support
@erikjohnston erikjohnston merged commit f721fdb into develop Dec 2, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants