Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

invoking search service directly from browser in aem 6.2

Avatar

Level 4

Hi

Am looking at use case to invoke search directly by making service call or by providing short url. I tried to invoke search service by hitting directly in browser and it takes to login screen; after login, it will display a json, but am looking at landing at search page. Is there any sling setting to be enabled?

http://localhost:4502/mnt/overlay/granite/ui/content/shell/omnisearch/searchresults.html?_charset_=u... HTTP/1.1

/libs/granite/ui/content/shell/omnisearch/searchresults/singleresults/searchpanel.html?location=site

3 Replies

Avatar

Level 10

I would look at writing a Sling Servlet and then return the result set as the servlet output. 

Avatar

Administrator

mohanb wrote...

am looking at making user land to search screen on click on of a URL.

 

Hi, 

The solution provided by scott will do the same.

Look at this example:-

Link:- https://helpx.adobe.com/experience-manager/using/custom-sling-servlets.html

// Here Post request to the "/bin/mySearchServlet" is returning the data. You could also write a service using query builder API and can create a url to return data.

Link:- https://helpx.adobe.com/experience-manager/using/using-query-builder-api1.html

//Use of Query builder api.

~kautuk

The ultimate experience is back.

Join us in Vegas to build skills, learn from the world's top brands, and be inspired.

Register Now