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
399 Views Asked by jerivas At
2
There are 2 best solutions below
1
Tom Dudfield
On
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
Related Questions in ASP.NET-MVC-3
- Routing Url that has no action name
- ObjectContext is disposed, can not longer used
- Image Gallery control not loading
- Skip login on MVC 3 application (SSO)
- JSON object passed to Controller is NULL
- What is the best practice for maintain a menu after a page reload? I have this custom code which feels wrong
- RedirectToAction doesn't happen when I start with an AJAX call
- Create view for a child-master relationship
- How to create edit view with a dropdownlist
- Pathname modified with IE
- Getting the property send by api in mvc
- How to create a dynamic dropdown in mvc
- set font awesome icon into textbox
- MVC3 POST model binding not working for particular complex model
- check for value null on razor syntax
Related Questions in SEARCH
- SQL weight rows by formula
- If Input is focused trigger X else trigger Y
- laravel full-text search with multiple keywords together
- Login form by using a new database, made in VB
- How to search for overloaded methods in a class
- Modifying Tries code in Java
- Doing a multi-column search for an item in a listView control using c#
- T SQL wildcard searching for a zip code
- django rest framework search filter all fields
- how to filter search result with dropdown list in php
- PHP/MySQL search... show all data by default, or show matched data
- Oracle multiple REPLACE options in REGEXP_REPLACE
- Is there a way to get all complete sentences that a search engine (e.g. Google) has indexed that contain two search terms?
- How to search a unknown composite key for dictionary in O(1) in c#
- android java search listview clickedItem
Related Questions in RAZOR
- Getting and passing MVC Model data to AngularJS controller
- Implement Onfailure in webApi controller
- Dynamic roles list in CustomAuthorize ASP MVC
- Jquery: Change contents of <select> tag dynamically
- Submit Button on Razor View doesn't call Action Result - MVC
- ASP MVC 5 Html.EditorFor not working / Unable to access/use Default Editor Templates
- Convert string to date time in a `cshtml` file using razor?
- jQuery: How to traverse / Iterate over a list of object
- Switching CSS Just for that view?
- Hyperlink in table header is not rendering
- why Special characters apostrophe and others shows like this ’, in HTMl file
- Display a tooltip with Html helper
- Cannot access conditional Razor variable as href
- MVC How to bundle html templates of type "text/html"?
- Set a label value for a checkbox helper in asp.net mvc
Related Questions in UMBRACO
- Failing to Log Into Umbraco admin Area
- Umbraco dependencies files (css, javascript) on IIS working on /wwwroot subfolder, not working everywhere else
- Cannot convert type 'Umbraco.Core.Dynamics.DynamicNull' to 'Umbraco.....' - Umbraco v6
- Umbraco - Changing media type
- Umbraco 7 lists
- Save + Publishing in Umbraco reverting back to previous save
- Multiple Folders in Multiple Media Picker Umbraco 7
- Deleting document types, content now inaccessible
- Umbraco - Could not load type 'usercontrols_NewContactUs'
- Umbraco 7 navigation menu link is not working
- Null reference on creating table with foreign key in Umbraco on application start
- Umbraco 404 with different culture not working
- Trouble installing Umbraco
- Umbraco upgrade issue with RTE & uSync & Forms
- Hide Properties Tab in Umbraco
Related Questions in UMBRACO5
- Upgrade to 7 Error: Could not load type 'Umbraco.Web.UI.Install.Default'
- Umbraco - upgrade from 6.2.0 to 7.1.8
- Umbraco 5 surface controller and partial macro
- Umbraco 5 how to get all roles and users
- Umbraco Data Insert
- Umbraco 5 Custom hive/tree provider - How is the location determined?
- Umbraco 5 Very Basic - How to load an entity in a macro (or actually using a HiveId)?
- Umbraco media section missing?
- Umbraco 5: site search
- JSON output in Umbraco 5
- Starting out with Umbraco 5.1
- How to get the context object in Custom Controller Umbraco 5?
- Umbraco 5 newb: Content from custom Table
- Umbraco 5.1 display image in template
- Can a WebRole be "recycled" programmatically?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
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.