Fabrizio Fortino created OAK-9091:
-------------------------------------

             Summary: oak-search-elastic: review query code
                 Key: OAK-9091
                 URL: https://issues.apache.org/jira/browse/OAK-9091
             Project: Jackrabbit Oak
          Issue Type: Improvement
          Components: elastic-search, indexing
            Reporter: Fabrizio Fortino
            Assignee: Fabrizio Fortino


The code to execute queries in the elastic module needs to be improved.

It has been inherited from the first prototype but has never been 
reviewed/refactored.

Here is what needs to be done:
 * ElasticsearchRowIterator [0] is the central point. We need to break it up 
and separate the query building phase from the interpretation of the response
 * Centralize how we resolve property names. This affects also mapping and 
indexing phases
 * We need to review how the queries are composed to increase performance. As a 
rule of thumb, we should always create a BoolQuery and leverage as much as 
possible the use of filters over matching queries. This allows us to use ES 
caching efficiently
 * Increase test coverage. Most of the testing in this area requires ES 
integration. We should add more unit tests checking that input query plans 
generate the expected ES requests.

[0] 
[https://github.com/oak-indexing/jackrabbit-oak/blob/8cc86c4d142004bf2550cf2ac66400b54093209d/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elasticsearch/query/ElasticsearchResultRowIterator.java]



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

Reply via email to