I am using OmniSearchService.getSearchResults() to get the search results. In publisher i am getting all the search results properly but in author its getting me 0 results. what could be the reason for this issue ?
As i am checking in logs i am getting 0 hits in author but in publisher all the results are coming fine.
Solved! Go to Solution.
Omnisearch works from below nodes which are marked as granite:InternalArea
You can find the code in these paths..
/libs/granite/ui/content/shell/omnisearch &
/libs/granite/ui/components/shell/omnisearch
Permissions: Make sure that the user you are using to perform the search has the necessary permissions to access the content in author. Check the user's permissions in the User Administration console.
Indexing: Check if the content is indexed properly in author. You can do this by going to the Query Debugger in the AEM author instance and running the same query that you are using in your code. If you get 0 results in the Query Debugger, then the content is not indexed properly.
Replication: Check if the content is replicated properly from publisher to author. If the content is not replicated properly, then it will not be available for search in author.
Search configuration: Check if the search configuration is the same in both publisher and author. Make sure that the search index is configured properly in both instances.
Code issues: Check if there are any code issues that are causing the search to fail in author. Make sure that the code is the same in both publisher and author.
https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/assets/manage/searc...
Hello @monish_gavali,
How are you instantiating the ResourceResolver (the one that you are passing into the getSearchResults method)? If its for a service user, make sure it has enough permission. to access intended modules.
Also please share (if possible) more detail about your implementation for better assistance.
Where can I check the permissions for service user ? Can you please tell me ?
You can check it under useradmin
Omnisearch works from below nodes which are marked as granite:InternalArea
You can find the code in these paths..
/libs/granite/ui/content/shell/omnisearch &
/libs/granite/ui/components/shell/omnisearch
Permissions: Make sure that the user you are using to perform the search has the necessary permissions to access the content in author. Check the user's permissions in the User Administration console.
Indexing: Check if the content is indexed properly in author. You can do this by going to the Query Debugger in the AEM author instance and running the same query that you are using in your code. If you get 0 results in the Query Debugger, then the content is not indexed properly.
Replication: Check if the content is replicated properly from publisher to author. If the content is not replicated properly, then it will not be available for search in author.
Search configuration: Check if the search configuration is the same in both publisher and author. Make sure that the search index is configured properly in both instances.
Code issues: Check if there are any code issues that are causing the search to fail in author. Make sure that the code is the same in both publisher and author.
https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/assets/manage/searc...
@monish_gavali Ideally this should not be a issue with author or publisher until you have some code written specific checking the run mode.
Below screen shot shows what is the output of getSearchResults method returns.
Make sure you don't have any code specific to author and publisher. And also make sure author and publish have the same nodes and levels
@monish_gavali Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
Views
Replies
Total Likes