Is there a viable way to search an Umbraco 5 site? I've read a lot on XLST search, but nothing using MVC3. It also seems that Examine is coming a little bit buggy, as even the backoffice has lost the search box that was present in v4. Any ideas?
Umbraco 5: site search
382 views Asked by jerivas At
2
There are 2 answers
1

I've created a very basic search, it might not be best way but it gives the results I need.
var results = Hive.QueryContent().OfRevisionType(FixedStatusTypes.Published).ToList().Where(c => c.AllAncestorIds().Any() && c.Name.ToLowerInvariant().Contains(query.ToLowerInvariant()) && c.Attribute<bool>("excludeFromSearch") == false).ToList();
OfRevisionType(FixedStatusTypes.Published)
returns published pages
c.AllAncestorIds().Any()
stops deleted items being returned
As you know Umbraco V5 is retire; you can try 4.x and do the above with user controls that do search logic using umbraco node factory.
Hope you get my views.