I have a issue with the result of the search query in the Experience Manager.
The search query returns all content as per the search term but for document(s) not in use it returns a /pagenotfound. Is there a way that unused documents can be excluded using the search? since the component class for search is EssentialsSearchComponent, I can only control how the search query is rendered in the search-main.ftl.
Would really appreciate some advice on this. Thanking you in advance.
Thank you for that advice. Using the count did help display the correct numbers but I’m having a pagination issue for search on a search term that exist in the documents created but not in use. Maybe the best solution would be to create classes that will extend the EssentialsSearchComponent.
org.onehippo.cms7.essentials.components.EssentialsSearchComponent seem to have been extended from org.onehippo.cms7.essentials.components.EssentialsListComponent which essentially seems to construct the query using org.hippoecm.hst.content.beans.query.builder.HstQueryBuilder. So, yes, extending org.onehippo.cms7.essentials.components.EssentialsSearchComponent and update the query in such a way so that it excludes unused documents would be ideal. But, the query may be complicated to construct as page components and sitemaps are placed under workspace (hst:workspace) whereas documents would be sitting under /content/documents, so some sort of a join query needs to be constructed here. Thanks!