Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-9091

oak-search-elastic: review query code

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.32.0
    • elastic-search, indexing
    • None

    Description

      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

      Attachments

        Issue Links

          Activity

            People

              fortino Fabrizio Fortino
              fortino Fabrizio Fortino
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: