EpiServer.Search always returning 0 results (CMS v11.9.3)

Vote:
 

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

#282829
Edited, Jul 01, 2022 9:28
Vote:
 

This blog post may help you: https://medium.com/@jayesh.madhwani335/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.

#282834
Jul 01, 2022 11:06
Vote:
 

Thanks Surjit, unfortunately no luck from those solutions 

#282982
Jul 04, 2022 7:52
Vote:
 

Hi Surjit,

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.

#282986
Edited, Jul 04, 2022 9:39
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.