[x] Bug report. If you’ve found a bug, please provide a code snippet or test to reproduce it below.
The easier it is to track down the bug, the faster it is solved.
[ ] Feature Request. Start by telling us what problem you’re trying to solve.
Often a solution already exists! Don’t send pull requests to implement new features without
first getting our support. Sometimes we leave features out on purpose to keep the project small.
Issue description
Hello,
When attempting to use the following configurations: es.read.field.as.array.include or es.read.field.include providing a value that contains a colon causes an org.elasticsearch.hadoop.EsHadoopIllegalArgumentException error.
Note that the following are palceholders in code for real names: STRUCTNAME, NESTEDFIELDn, PREFIX, SUFFIXn, INDEXn.
INDEX1 does not contain field names with : while INDEX2 only contains fields with :.
What kind an issue is this?
The easier it is to track down the bug, the faster it is solved.
Often a solution already exists! Don’t send pull requests to implement new features without first getting our support. Sometimes we leave features out on purpose to keep the project small.
Issue description
Hello,
When attempting to use the following configurations:
es.read.field.as.array.include
ores.read.field.include
providing a value that contains a colon causes anorg.elasticsearch.hadoop.EsHadoopIllegalArgumentException
error.Steps to reproduce
Code:
Setup for testing
Note that the following are palceholders in code for real names:
STRUCTNAME
,NESTEDFIELDn
,PREFIX
,SUFFIXn
,INDEXn
.INDEX1
does not contain field names with:
whileINDEX2
only contains fields with:
.Working on nested field in
INDEX1
:Working without setting in
INDEX2
:Error (1) with include setting:
results in:
as does including the suggestion from this thread
Error (2) with include setting:
results in:
Working with
exclude
Trace
Error 1
``` org.elasticsearch.hadoop.EsHadoopIllegalArgumentException: Failed to parse [es.read.field.as.array.include] option with value of [PREFIX:SUFFIX2] --------------------------------------------------------------------------- Py4JJavaError Traceback (most recent call last) FileError 2
``` org.elasticsearch.hadoop.EsHadoopIllegalArgumentException: Invalid parameter [PREFIX:SUFFIX1] specified in inclusion configuration --------------------------------------------------------------------------- Py4JJavaError Traceback (most recent call last) FileVersion Info
OS: Databricks Runtime 14.2 on Azure JVM : Unknown
Hadoop/Spark: Spark 3.5.0 ES-Hadoop : org.elasticsearch:elasticsearch-spark-30_2.12:7.17.1 ES : 7.17.1
Feature description