Uploaded image for project: 'Spring Data Elasticsearch'
  1. Spring Data Elasticsearch
  2. DATAES-653

Make it easier to use a custom request converter when extending DefaultReactiveElasticsearchClient

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 3.2 RC3 (Moore)
    • Fix Version/s: 4.0 RC1 (Neumann)
    • Component/s: Core
    • Labels:
      None

      Description

      Consider the following situation: I find out that the DefaultReactiveElasticsearchClient does not send some parameter because the default converter from RequestConverters does not put it to the produced Request. In my case, the request was 'index' and the parameter was 'if_seq_no'.

      I subclass the DefaultReactiveElasticsearchClient and override the index() method. But it turns out that I need to call sendRequest() method which is private. As I result, I have to borrow some 100 lines of code from DefaultReactiveElasticsearchClient. Later, I will have to support those ~100 lines, look, what changed with each release, and so on.

      My suggestion is to make the sendRequest() method protected and final (to follow the Open/Closed principle). I'm not sure whether it's the best way to go. This can probably be a starting point for a discussion.

      I'm going to create a pool request soon.

        Attachments

          Activity

            People

            Assignee:
            sothawo sothawo
            Reporter:
            rpuch Roman Puchkovskiy
            Last updater:
            Mark Paluch
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: