We have moved to GitHub Issues
Created by Tony Fletcher 15 Jul 2013, 08:16:14 Updated by Sebastiaan Janssen 06 Oct 2013, 16:04:14
,I have an Umbraco 4.11.8 site and I have noticed something strange happening with the Umbraco backend search. As I start typing I can see it picking up nodes that match the search but as soon as I type a space then suddenly no results are show. For example if I was to type "test" then it would find "test doc 1", "test doc 2", "test doc 3" but as soon as I add a space i.e. "test " then no results are shown.It is almost as if the space in the index is different to the space that my spacebar is adding if that makes sense! I have even tried deleting the node name and typing it again, I have also tried copying the text from the "Name" property of the node into the search box but that doesn't work either.I have an Examine add-on for querying the index and this finds the articles fine when I add spaces so it seems that it is just the Umbraco backend search box that has a problem.
I [commented on this same problem|http://issues.umbraco.org/issue/U4-416#comment=67-2447] in another issue about a year ago, and there are a handful of other old outstanding issues regarding the backend search feature not working 100% of the way. In fact, I don't think backend search has ever worked for me as well as expected for a few years now, going back to at least v4.7, possibly earlier?
I have resolved this myself by modifying the QuickSearchHandler.ashx.cs file in the source code, I changed the following line "var operation = criteria.Field("__nodeName", txt.MultipleCharacterWildcard());" to "var operation = criteria.Field("__nodeName", txt);"
I've put Tony's fix in a pull request: https://github.com/umbraco/Umbraco-CMS/pull/135
NB: I've added another commit to the pull request which updates the query operation to allow words in different order... todo: keyword highlighting does not work correctly
I've put this into the 6.2 branch. One thing to note, the GroupedOr was fixed in a recent examine version so you might not even have to do that splitting, might be worth having a look in the 6.2 branch?
I won't have time to, so if someone else wants to pick it up, jump in :-)
no worries, i'll have a look! Just might simplify it a little :)
After updated 4.11.9 to 6.*, the backoffice search function is not be able to used.
Oh I just noticed that my pull request adjusts the 'autocomplete' part of the search but didn't alter the actual results window which pops up if you press enter.
@Murray fixed in rev 3ff9d6adbc22eeaa9fc70153b8c5b9858e6cc338 We should extract the search code and put it in a single class at some point so that updates to both aren't needed any more.
Setting to fixed as it works now, any other simplification tasks can be tracked in a new issue if needed.
Assignee: Shannon Deminick
Backwards Compatible: True
Fix Submitted: Pull request
Due in version: 6.2.0