Search option 'match whole words only' does not work as expected with database objects.
Allow me to explain by examples.
Example A:
I enter the search term 'test' (without the apostrophes) and I DO NOT check the 'match whole words only' option. I get the following hits:
- somethinginfronttest
- testsomethingbehind
- test
- [test]
- dbo.test
- dbo.[test]
So far so good, all hits are as expected.
Example B:
I then enter the search term 'test' (without the apostrophes) and I CHECK the 'match whole words only' option. I get the following hits:
- test
And that's it. I do not get the following hits:
- somethinginfronttest
- testsomethingbehind
- [test]
- dbo.test
- dbo.[test]
The first two are as I expect. However, the other three or not.
I would expect (or perhaps I should use the word 'prefer') to also get hits for [test], dbo.test and dbo.[test].
My use case is that often I want to find usages of specific tables or stored procedures.
And sometimes the SQL goes like "LEFT JOIN test", sometimes "LEFT JOIN dbo.test" and sometimes "LEFT JOIN [test]".
If I search using the option 'match whole words only' checked, then I do not get all occurrences.
If I search using the option 'match whole words only' unchecked, then I get way too much occurrences in my case (a huge code base, that has objects like NextTest, TestForThis, TestForThat, etc.).
![](https://secure.gravatar.com/avatar/83a907577bc947a32c2d5929e756a405?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)