Uploaded image for project: 'Hibernate Search'
  1. HSEARCH-2750

Move Elasticsearch query building (ToElasticsearch, parts of ElasticsearchHSQueryImpl) to a non-static object in ElasticsearchService


    • Type: Task
    • Status: In Progress
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 6-before-POC-merge
    • Component/s: elasticsearch
    • Labels:



      1. There's way too much code in ElasticsearchHSQueryImpl, we should split it into smaller class to make it easier to understand/maintain
      2. I'm pretty sure that changes related to HSEARCH-2055 In Progress will force us to streamline a bit more how we build Elasticsearch queries (most notably to handle projections in a more generic and extensible way).
      3. And even more importantly, we'll need to implement parts of Elasticsearch queries differently depending on the Elasticsearch version we're targeting eventually.
        Actually we already do in HSEARCH-2603 Closed , but that ticket is too insignificant to justify such a massive refactoring (I'll probably just introduce the Façade with only one simple method, leaving the actual refactoring for later). Still, it's only a matter of time before we really need it.

      Some examples of what should probably be moved out of ElasticsearchHSQuery:

      • projection handling (creation of FieldProjection objects while populating the JsonObject representing the Elasticsearch query)
      • facet request building
      • filtering
      • sorts
      • ...


          Issue links



              • Assignee:
                yrodiere Yoann Rodière
                yrodiere Yoann Rodière
              • Votes:
                0 Vote for this issue
                1 Start watching this issue


                • Created: