Skip to content

Add CommonRequestOptions to constructor of ScrollPublisher and SearchIterator#3800

Open
ChrisMcD1 wants to merge 1 commit intoPhilippus:series/9.xfrom
ChrisMcD1:adding-publisher-common-options
Open

Add CommonRequestOptions to constructor of ScrollPublisher and SearchIterator#3800
ChrisMcD1 wants to merge 1 commit intoPhilippus:series/9.xfrom
ChrisMcD1:adding-publisher-common-options

Conversation

@ChrisMcD1
Copy link
Contributor

It seems that currently there is no way to make the ScrollPublisher include authentication in its request to elasticsearch, since it calls the execute method internally, but has no way to pass in the CommonRequestOptions that would contain that authentication.

Given that the ScrollPublisher has a singular SearchRequest in its construction, I think it makes sense to include the options for that request alongside it.

I noticed the same thing in SearchIterator, and added it to

I also searched around the code base, and it seems that the following other classes have calls to ElasticClient.execute, and no way to pass options to them. However, they do not have their request object taken in at construction, and I am not currently using any of them, so I wasn't sure what the best way to pass in the options to them would be.

  • BulkIndexingSubscriber
  • BatchElasticSink
  • ElasticSource

If anyone has a workaround to get authentication working with these at all in the interim, I would love to hear it! Currently planning to vendor this dependency with these patches.

@ChrisMcD1
Copy link
Contributor Author

Also, this will need to be integrated with #3724, depending on who merges first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant