Search Result Using Servlet | Community
Skip to main content
October 16, 2015
Solved

Search Result Using Servlet

  • October 16, 2015
  • 5 replies
  • 1583 views

Hello Everyone,

I have developed a Content Finder tab in which User would be able to view all content (Text/paragraphs) from Geometrixx website by default. Now I need to write a servlet to get content/paragraphs by using keywords (just like how they are able to search keywords in images).

Any Suggestion would be highly appreciated !

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008
   Build a servlet and use the Query builder API in the servlet. You can use search terms in Query builder API.   For information  about using Query builder API, see https://helpx.adobe.com/experience-manager/using/using-query-builder-api1.html  

5 replies

smacdonald2008
smacdonald2008Accepted solution
New Participant
October 16, 2015
   Build a servlet and use the Query builder API in the servlet. You can use search terms in Query builder API.   For information  about using Query builder API, see https://helpx.adobe.com/experience-manager/using/using-query-builder-api1.html  
October 16, 2015

Hi smacdonald2008, Can u suggest me how to call servlet  from the javascript file (custom tab file) to display the custom search result in content finder tab.

Thanks,

Sawan

Employee
October 16, 2015

Hi,

there are various examples of getting results from a servlet with Ajax.[1][2]

Here is an example of how to create and populate a new tab in content finder[3]

Regards,

Opkar

[1] https://helpx.adobe.com/experience-manager/using/custom-sling-servlets.html

[2] https://helpx.adobe.com/experience-manager/using/using-ajax-requests-display-cq.html

[3] https://chanchal.wordpress.com/2013/06/26/how-to-add-your-own-content-finder-tab-in-cq5/

October 16, 2015

Hi Opkar,I gone through [3] example,If you look in servlet "entries" has not been defined anywhere . Can u suggest me logic and  how to initalize "entries" ?  I am new to CQ5,not getting how to write the logic for this part.

smacdonald2008
New Participant
October 16, 2015

Here is another example of using a Servlet to call a servlet that reads the AEM JCR and constructs JSON data. Then the data is displayed in an AEM GUI component - in this case - a tree component. 

See:

https://helpx.adobe.com/experience-manager/using/creating-custom-cq-tree.html