Khoros Community

Highlighted
Occasional Advisor
Occasional Advisor

Search using API with autosuggest?

When implementing search over API as mentioned here , is it possible to have search results displayed as you type, just as on the community itself?

 

How to go about this?

Tags (2)
0 Kudos
4 Replies 4
Honored Contributor Honored Contributor
Honored Contributor

Re: Search using API with autosuggest?

@Benjamin - Yes, but you'd have to develop that yourself using this API. There are a lot of examples online and we have implemented this custom instant search for a few of our customers. 

 

http://www.optiverse.com/

http://community.centrify.com/

 

For your reference, please check these links. 

 

http://www.trycatchclasses.com/angularjs-instant-search-example/ 

https://codepen.io/shahansha/pen/pvWJyv

 

or you can try JS instant search, just use this API as the source.

 

I hope this helps.

 

Thanks,

Varun


Varun | Weaving magic with Lithium!

Recent Ideas: Advanced Private Messages | Rewarding Module | Badges for Threads
Reply
Loading...
Occasional Advisor
Occasional Advisor

Re: Search using API with autosuggest?

I bring up a question from our devs.:

 

We tried to make the search request on a different domain as the community. 


Lithium Community page does not contain any "Access-Control-Allow-Origin" header parameter in their response and because of that, it is not possible to make a proper AJAX request ( from JavaScript ). If AJAX response does not contain configured "Access-Control-Allow-Origin" header parameter, then it is not possible to make cross domain requests.

 

Is it possible to configure this for the Community page? 

 

Or is there some kind of specific "public Lithium API Endpoint", against which there would be no problem to make AJAX requests?

0 Kudos
Reply
Loading...
Lithium Alumni (Retired) Lithium Alumni (Retired)
Lithium Alumni (Retired)

Re: Search using API with autosuggest?

CORS can be enabled for specific domains/urls by Lithium Professional Services or Support.

Note that CORS is only supported for REST API urls and custom endpoints.

Reply
Loading...
Honored Contributor Honored Contributor
Honored Contributor

Re: Search using API with autosuggest?

As @ChiaraS mentioned, you could get the CORS enabled. We have done it already.

Varun | Weaving magic with Lithium!

Recent Ideas: Advanced Private Messages | Rewarding Module | Badges for Threads
0 Kudos
Reply
Loading...