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

Fix scary search behavior on terms containing dash character #158

Merged
merged 1 commit into from
Jul 19, 2016

Conversation

amazon
Copy link
Contributor

@amazon amazon commented Aug 17, 2015

Currently, dash character is defined as non-word character and it results into following search oddities:

$ knife node create mysql -d -z
Created node[mysql]
$ knife node create mysql-slave -d -z
Created node[mysql-slave]
$ knife search node 'name:mysql' -a name -z
2 items found

mysql:
  name: mysql

mysql-slave:
  name: mysql-slave

$ knife search node 'name:mysql?slave' -a name -z
0 items found

$ knife search node 'name:mysql-?lave' -a name -z
1 items found

mysql-slave:
  name: mysql-slave

@chef-supermarket
Copy link

Hi. I am an automated pull request bot named Curry. There are commits in this pull request whose authors are not yet authorized to contribute to Chef Software, Inc. projects or are using a non-GitHub verified email address. To become authorized to contribute, you will need to sign the Contributor License Agreement (CLA) as an individual or on behalf of your company. You can read more on Chef's blog.

GitHub Users Who Are Not Authorized To Contribute

The following GitHub users do not appear to have signed a CLA:

Please sign the CLA here.

@chef-supermarket
Copy link

Hi. Your friendly Curry bot here. Just letting you know that all commit authors have become authorized to contribute. I have added the "Signed CLA" label to this issue so it can easily be found in the future.

@lazyval
Copy link

lazyval commented Aug 18, 2015

@amazon it would be nice to see backing spec for new behaviour, but overall 👍

@sawanoboly
Copy link
Contributor

I've tested this. It will solve #158 .

before patch.

$ knife node list
aaa.host
bbb-aaa.host

$ knife search node "name:aaa.host"
2 items found

after patch.

$ knife search node "name:aaa.host"
1 items found

@lamont-granquist
Copy link
Contributor

👍

1 similar comment
@thommay
Copy link
Contributor

thommay commented Jul 19, 2016

👍

@thommay thommay merged commit dc9d105 into chef:master Jul 19, 2016
@tas50 tas50 added the bug label Jul 19, 2016
@thommay thommay added Type: Bug Does not work as expected. and removed bug labels Jan 24, 2017
@chef chef locked and limited conversation to collaborators Nov 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Bug Does not work as expected.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants