You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@syncope.apache.org by Vinay Kavala <Vi...@govaris.com> on 2022/02/11 15:47:35 UTC
Elastic Search extension usage and the impacted API's
Hi Team,
I have couple of questions related to Elastic Search extension.
1. I just wanted to understand which API's are returning the cached attributes/results from the elastic search, after a successful elastic search extension configuration with Syncope Core.
* for example - I assume the below API's fetch results from the elastic search cache, correct me if I am wrong. Are there any other API's which are returning the cached response? Where do I find the list of API's being served from elastic cache?
* /users
/users/{key}
/anyObjects
/anyObjects/{key}
/schemas
/schemas/{type}
2. Is there a way to turn off the elastic search cache on syncope after configuration? Is there a toggle to turn on/off the cache? Or do I need entirely revert all the configuration changes in order to turn off the cache?
Thanks,
Vinay
Re: Elastic Search extension usage and the impacted API's
Posted by Andrea Patricelli <an...@apache.org>.
Hi Vinay,
More than a cache is a parallel persistence that stores only some
information to better index searches.
Please read my responses inline.
On 11/02/22 16:47, Vinay Kavala wrote:
> Hi Team,
>
> I have couple of questions related to Elastic Search extension.
>
> 1. I just wanted to understand which API's are returning the cached
> attributes/results from the elastic search, after a successful
> elastic search extension configuration with Syncope Core.
> 1. for example - I assume the below API's fetch results from the
> elastic search cache, correct me if I am wrong. Are there any
> other API's which are returning the cached response? Where do
> I find the list of API's being served from elastic cache?
> 2. /users
> /users/{key}
>
> /anyObjects
> /anyObjects/{key}
>
> /schemas
> /schemas/{type}
>
ATM only searches are performed through the Elasticsearch extension,
here is the code [1]. So we can assume that only
* GET /users
* GET /groups
* GET /anyObjects
search APIs use the Elasticsearch "cache".
> 1.
>
>
>
> 1. Is there a way to turn off the elastic search cache on syncope
> after configuration? Is there a toggle to turn on/off the cache?
> Or do I need entirely revert all the configuration changes in
> order to turn off the cache?
>
>
Basically you should revert all changes described here [2] (Enable the
Elasticsearch extension) to return to a "clean" situation. But the most
important change is to update this line [3] in your specific project
configuration folder and restart the application server. The property
any.search.dao leverages the search DAO bean to use, the default value
is at [4].
> Thanks,
> Vinay
>
>
>
HTH,
Andrea
[1]
https://github.com/apache/syncope/blob/2_1_X/ext/elasticsearch/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/ElasticsearchAnySearchDAO.java
[2]
https://syncope.apache.org/docs/2.1/reference-guide.html#customization-core
[3]
https://github.com/apache/syncope/blob/syncope-2.1.10/ext/elasticsearch/persistence-jpa/src/main/resources/persistence.properties#L22
[4]
https://github.com/apache/syncope/blob/syncope-2.1.10/core/persistence-jpa/src/main/resources/persistence.properties#L22
--
Andrea Patricelli
Tirasa - Open Source Excellence
http://www.tirasa.net/
Member at The Apache Software Foundation
Syncope