[opencms-dev] Content Search

Paul-Inge Flakstad flakstad at npolar.no
Fri May 20 11:57:34 CEST 2016


Hi Aye,

For a similar use case, I wrote a JSP that queries a search index in OpenCms, and generates a JSON(P). Here it is:
https://github.com/paulflakstad/MOSJ2015/blob/master/web/system/modules/no.npolar.mosj/elements/indicators-feed.jsp

You may be able to use this as a foundation for your own use case – both for the auto-complete functionality and the search results page. Having your matches available as JSON(P) should be a good starting point for implementing jQueryUI autocomplete, see https://jqueryui.com/autocomplete/#remote

Hope this helps.

Cheers,
Paul

From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Aye Thi Tar
Sent: 9. mai 2016 04:36
To: The OpenCms mailing list <opencms-dev at opencms.org>
Subject: [opencms-dev] Content Search

Hi,

I want to develop a search box for the navigation for the site i am building. One of the requirement is to have an auto complete function. The auto complete data should be pulled dynamically from the content of the whole site, so it should be indexed somehow. And there will be a separate page to show the results depends the search keywords. There is one search box in openCMS demo site. I've already checked it out but I still didn't get idea how to make it. Is there any references i check for this? or has someone done this before?.

Will really appreciate your help on this. Cheers!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20160520/9121ef48/attachment.htm>


More information about the opencms-dev mailing list