You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Fabrizio Fortino (Jira)" <ji...@apache.org> on 2021/01/12 17:33:00 UTC

[jira] [Resolved] (OAK-9311) oak-search-elastic: use low-level client for critical operations

     [ https://issues.apache.org/jira/browse/OAK-9311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fabrizio Fortino resolved OAK-9311.
-----------------------------------
    Fix Version/s: 1.38.0
       Resolution: Fixed

Fixed with revision 1885376, 1885391, 1885401.

> oak-search-elastic: use low-level client for critical operations
> ----------------------------------------------------------------
>
>                 Key: OAK-9311
>                 URL: https://issues.apache.org/jira/browse/OAK-9311
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>            Reporter: Fabrizio Fortino
>            Assignee: Fabrizio Fortino
>            Priority: Major
>             Fix For: 1.38.0
>
>
> We are currently using the Java High-Level Rest Client [1] to interact with Elastic. While this is quite handy to use it does not seem to be the best option in terms of performance [2]. 
> Using the low-level client would mean to write more code in OAK with the advantage of having better performances and flexibility. For example, we could instruct ES to return only the response we are interested in [3]. In our searches, we are usually interested in the path field and, when requested the facets fields. ES for each document returns the index name. Since we use pretty long index names, only removing this would decrease the payload size by 20/30%.
> To have good performance and nice code we could keep using the query builders provided by ES. The query builders output should then be used to perform the request to ES through low-level client. The response needs to be parsed in OAK. 
> [1] https://www.elastic.co/guide/en/elasticsearch/client/java-rest/master/java-rest-high.html
> [2] https://discuss.elastic.co/t/performance-difference-between-java-high-level-rest-client-vs-low-level-rest-client/125775
> [3] https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#common-options-response-filtering
> Options



--
This message was sent by Atlassian Jira
(v8.3.4#803005)