Handling of the ignore_unavailable flag (and Indices Options in general)

Hi,

Looking at the IndexResolverReplacer, the indice options are hardcoded, and the ignore_unavailable is set to false.

Is there a reason for that ? Because this breaks the compatibility with the ES api as far as I understand.

Why not passing down the indices options of the original IndicesRequest down to the IndexNameExpressionResolver ?

I can submit a patch if needed.

Thanks,

Kind Regards

Thx for pointing this out, i will have a look …

···

On Monday, 10 December 2018 17:34:56 UTC+1, renaud wrote:

Hi,

Looking at the IndexResolverReplacer, the indice options are hardcoded, and the ignore_unavailable is set to false.

Is there a reason for that ? Because this breaks the compatibility with the ES api as far as I understand.

Why not passing down the indices options of the original IndicesRequest down to the IndexNameExpressionResolver ?

I can submit a patch if needed.

Thanks,

Kind Regards

I have submitted a PR for this:

https://github.com/floragunncom/search-guard/pull/608

I am currently running the full test suite.

···

On Wednesday, December 12, 2018 at 8:23:00 AM UTC+1, Search Guard wrote:

Thx for pointing this out, i will have a look …

On Monday, 10 December 2018 17:34:56 UTC+1, renaud wrote:

Hi,

Looking at the IndexResolverReplacer, the indice options are hardcoded, and the ignore_unavailable is set to false.

Is there a reason for that ? Because this breaks the compatibility with the ES api as far as I understand.

Why not passing down the indices options of the original IndicesRequest down to the IndexNameExpressionResolver ?

I can submit a patch if needed.

Thanks,

Kind Regards

I fixed a few errors in the IntegrationTests (where the ignore_unavailable was set to true) and the handling of RestoreSnapshotRequest (which does not implement IndicesRequest).

···

On Wednesday, December 12, 2018 at 9:44:43 AM UTC+1, renaud...@siren.io wrote:

I have submitted a PR for this:

https://github.com/floragunncom/search-guard/pull/608

I am currently running the full test suite.

On Wednesday, December 12, 2018 at 8:23:00 AM UTC+1, Search Guard wrote:

Thx for pointing this out, i will have a look …

On Monday, 10 December 2018 17:34:56 UTC+1, renaud wrote:

Hi,

Looking at the IndexResolverReplacer, the indice options are hardcoded, and the ignore_unavailable is set to false.

Is there a reason for that ? Because this breaks the compatibility with the ES api as far as I understand.

Why not passing down the indices options of the original IndicesRequest down to the IndexNameExpressionResolver ?

I can submit a patch if needed.

Thanks,

Kind Regards