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
402 views Asked by jerivas At
2
There are 2 answers
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
- Insert new user AspNetUser from another controller in .NET 7
- Error HRESULT E_FAIL has been returned from a call to a COM component in Asp.net MVC
- ASP.NET MVC 3/4 Razor - public action method not found - how to debug
- get data by linq but have Error when doit this
- ASP.NET issue facing exception issue
- How to Implement a View Count Feature for a Blog Website in Asp.net MVC Using a Database?
- Unable to install ASP.NET MVC 3 using chocolatey
- Display data from DB to ajaxToolkit LINE CHART (Ajax control Toolkit v20.1) Using ASP.NET Webform C# (Dissertation Question)
- Why ModelState Isvalid false when working on images
- How to create an ASP.NET MVC 3.2.7 page with 3 view models
- How to make correct test project
- MVC Increase max number of concurrent simultaneous request per user
- Error Number:2705,State:4,Class:16 Code first approach
- Integrating the SSO for MVC3 application with AzureADB2C account
- How to integrate Asp.Net MVC existing application to MAUI Framework
Related Questions in SEARCH
- How to create a regular expression to partition a string that terminates in either ": 45" or ",", without the ": "
- Hospital route finding ai project
- tryin to write a function that searches for SSN in a dict, and if that SSN is found, to retrieve all the data associated with that SSN
- How the search filter from search bar works in mern?
- Angular application loading weirdly when I add "/" at the end of URL
- Elastic python to extract last 1hr tracing
- How to detect if two sentences are simmilar, not in meaning, but in syllables/words?
- I need to have a look at all my private pine scripts and filter the scripts for certain words in TRADINGVIEW
- What is correct URL? {'quandl_error': {'code': 'QECx01', 'could not recognize URL: /api/v3/databases/WIKI/search. Please check URL and try again.'}
- Solr 9 punctuation issue
- Autocomplete search filter not working for dynamically added input fields in angular
- How to correct call API search request with debounce?
- Search in GDrive only the first 5 topics
- How do I use sp/pnp sp.search to find all Associated sites when querying a hub site Id
- How to apply custom analyzers on a field in Vespa schema
Related Questions in RAZOR
- I have a problem outputing the roles on the page ListRoles.cshtml
- ASP.NET Core MVC : NullReferenceException: Object reference not set to an instance of an object
- Blazor/Razor resolve components using dependency injection
- Receiving 400 bad request on post when customer auth handler is used
- Prevent modal from popping up when freeze button is clicked
- AJAX Requests from jQuery to ASP.NET Core API Losing Authentication
- Initialize a singleton from cookies for a ASP.NET Core Razor project
- Razor.RuntimeCompilation creates an error
- ASP.NET Core MVC invoke function through button on razor page
- Runtime Compilation of Razor Pages Does Not Work .NET 8 VS2022
- Why does my ASP.NET Core MVC application add some identifier to HTML elements?
- Question | Visual Studio Code Editor .cshtml file not working properly
- Error in Using references with Blazor Client
- JQuery accordion not working in Razor page
- Challenge with ASP.NET Web Forms to .NET 8 Razor Pages Migration on Private Server
Related Questions in UMBRACO
- Call a javascript function on form submission in Umbraco
- Creating a Custom field type in Umbraco to supports the invisible enterprise reCaptcha
- How to filter swiper carousel using jquery?
- Cannot DROP CONSTRAINT in SQL Server
- Adding custom text field to umbraco form setting
- Adding UseCookieConsent to Umbraco causes HTTP 417: Expectation Failed in the back office
- Umbraco content delivery api method to combine queries
- Path returns at negative number string - UmbracoHelper
- Umbraco 13 Macro Parameters Rich Text Editor
- Building a Queries in Umbraco 12+
- Can I create all CRUD Operations in a Surface Controller in Umbraco?
- Loop through a subset then the main set C#, Razor, linq, Umbraco
- get model data from form during post in Umbraco 10
- How can I update multiple Nuget packages to a specific version at the same time?
- Umbraco 13 - Customized dictionary search
Related Questions in UMBRACO5
- Umbraco with MVC Controller
- What port does Courier for Umbraco use?
- Umbraco AncestorOrSelf(int)
- SessionStateTempDataProvider class requires session state to be enabled Umbraco Contour
- How can we to access value of umbraco dictionary item from Javascript
- Upgrade to 7 Error: Could not load type 'Umbraco.Web.UI.Install.Default'
- Umbraco - upgrade from 6.2.0 to 7.1.8
- Are Umbraco dictionary items cached?
- Umbraco Member Tab - How to list the members
- How to add a tree inside a custom section in umbraco 6.1.x
- 404 - File or directory not found. In umbraco
- Add css and Javascript code
- Get Collection after traversing in Umbraco
- Type True/False in Umbraco
- When to use Umbraco?
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?
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)
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.