I'm a bit stumped as to why my EpiServer.Search is always returning 0 results.
It's occuring in the
public virtual SearchResults GetSearchResults(IQueryExpression queryExpression, int page, int pageSize)
method in the EpiServer.Search SearchHandler class.
I'm calling this method from here, and this is where I get 0 results
public virtual SearchResults Search(string searchText, IEnumerable<ContentReference> searchRoots, HttpContextBase context, string languageBranch, int maxResults)
var query = CreateQuery(searchText, searchRoots, context, languageBranch);
return _searchHandler.GetSearchResults(query, 1, maxResults);
All the parameters seem to be getting the correct values but I always end up with 0 hits despite there being pages that should match the query string.
Let me know what more info I need to provide, I'm an episerver noob!
EDIT:Just discovered a new error in the logs:
ERROR EPiServer.Search.Internal.RequestHandler: Could not get search results for uri ..
For security reasons DTD is prohibited in this XML document
This blog post may help you: https://email@example.com/enable-search-in-episerver-cms-11-f2498ad17c64
When I had the issue I while back, I needed to install some windows features which I got from the blog post.
Thanks Surjit, unfortunately no luck from those solutions
Try this one: https://world.optimizely.com/forum/legacy-forums/Episerver-Relate/Thread-Container/2011/5/EPiServer-Full-Text-Search-Service-404-error/
Installing WCF services seems to have solved some of the issues on production but not in my local environment, for some reason. The search is no longer showing 0 results but it's pretty inconsistent in what content it includes.
It did solve my problem however and I will keep investigating :)
EDIT: Site content hadn't been re-indexed in years (!), which made it not find any content created after that point. Re-indexing fixed it.