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

Add partial word support to search #18

Open
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@ProLoser

ProLoser commented Oct 11, 2018

"adop" should yield "adopt a drain"

ProLoser added some commits Oct 11, 2018

Add partial word support to search
"adop" should yield "adopt a drain"
@jszwedko

👍

Only initial concern was performance, but I can't imagine that's an issue with a set this size.

Link to deploy preview since Netlify didn't add it: https://5bbec62582d3f109f7ce3eca--codeforsanfrancisco.netlify.com/projects/

@ProLoser

This comment has been minimized.

Show comment
Hide comment
@ProLoser

ProLoser Oct 11, 2018

I wanted to keep iterating on this, I think we can easily add some filtering by making tags add stuff like skills_needed:rails to the search query on click. Unfortunately my '*'+query+'*' breaks this. Is there a way to configure * behavior without modifying the query string?

ProLoser commented Oct 11, 2018

I wanted to keep iterating on this, I think we can easily add some filtering by making tags add stuff like skills_needed:rails to the search query on click. Unfortunately my '*'+query+'*' breaks this. Is there a way to configure * behavior without modifying the query string?

@jszwedko

This comment has been minimized.

Show comment
Hide comment
@jszwedko

jszwedko Oct 12, 2018

Member

Ah, yeah, I see what you mean.

You might be able to use lunr.tokenizer to break up the search query passing { wildcard: lunr.Query.wildcard.LEADING | lunr.Query.wildcard.TRAILING } as the metadata to append the wildcards to each term.

Member

jszwedko commented Oct 12, 2018

Ah, yeah, I see what you mean.

You might be able to use lunr.tokenizer to break up the search query passing { wildcard: lunr.Query.wildcard.LEADING | lunr.Query.wildcard.TRAILING } as the metadata to append the wildcards to each term.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment