-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Use word boundary matching #1483
Conversation
If you want to make a change to this branch, please make a branch and target this with a PR just as you would a change to master. |
Turning off |
Right. And I think maybe this should be totally clear. Maybe a change isn't need. |
Another question is whether we should merge this in or switch to the fuzzy matching of #1037 instead |
This would also fix #424, as word boundary matching doesn't count a |
@pfiller I've just rebased this branch on current master and I like to finish this PR, so we probably have to make some decisions :) |
Hey! Cheers |
Am very interested in this feature! Any chance? |
Word boundary doesn't work as one might expect in the following example... This is an example - with hyphen This is an example -with hyphen This is an example-with hyphen This is an example/with forward slash This is an example/ with forward slash This is an example / with forward slashdifferent search results... Search Text Results |
This fix would help me out lots. Any ETA for this fix? |
Joel, I'm using select2 instead of chosen now. I added this to the select2 matcher... matcher: function(term, text) {
'i'); Travis
This fix would help me out lots. Any ETA for this fix? |
This would be helpful for me as well. |
I think after 2 years it's pretty clear that this relatively simple fix is not going to happen. I recommend using selectize instead. You not only won't deal with this particular issue, but in my experience, it's been better in every way. |
Agreed. I went with select2 |
@pfiller should we add the target label to this one for our next hangout? |
aaea71f
to
21fa001
Compare
Rebase is done, and no real blockers I think;
|
Also would like to quote @pfiller
Is 4 years light enough? 🤓 |
@koenpunt I agree.
If you're giving a 👍 to the code, I say ship it! (In a rare fit of proximity, I can physically see @pfiller right now. I'll try to force him to... do anything? Respond? ¯\_(ツ)_/¯ Anyway, don't wait for him if you feel good about it.) |
It goes a bit against our (or mine) prior notice;
But technically it's not a new feature anymore. |
It's also not really a new feature — it's just fixing an existing feature to work way better. I might even call it a bugfix, based on all the linked issues! @pfiller said @satchmorun might have some insight here, since he was allegedly poking around similar areas of Chosen recently. Regardless, I think we should merge this by Monday at the latest. If you want to wait and see if @pfiller or @satchmorun has anything to say, go for it, but if you don't, also go for it. |
d782b72
to
4cfeb09
Compare
Done 🚀 |
@koenpunt ❤️ ❤️ 😻 ❤️ |
@harvesthq/chosen-developers
This is a new PR for @koenpunt's excellent #1465. In his words:
I want to be very careful about merging this in, but I'm loving what I see so far. With default options set:
Here's what I think we should do before this gets a final
enable_split_word_search
orsearch_contains
. I don't think you should be able to turn offenable_split_word_search
ifsearch_contains
istrue
, but I want to do some experimenting there.Fixes #75 and #1463