Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is index.version.created supposed to be fixed? #17

Open
daviddyball opened this issue Aug 4, 2016 · 8 comments
Open

Is index.version.created supposed to be fixed? #17

daviddyball opened this issue Aug 4, 2016 · 8 comments

Comments

@daviddyball
Copy link

Hi,

In my index settings I changed the index.version.created number from the example 1070499 to the propper version to match my ES deployment (2030399) and creating mappings after doing so fails with

Mapping definition for [image] has unsupported parameters: [feature: ......... ]

Is this hard-coded somewhere in the plugin itself?

Cheers,
D

@kiwionly
Copy link
Owner

kiwionly commented Aug 4, 2016

No, elasticsearch check the version itself.

@daviddyball
Copy link
Author

Interesting. The results are the same if I leave out index.version.created altogether. The mappings just aren't available anymore.

@daviddyball
Copy link
Author

@kiwionly Do you know what value Elasticsearch is querying specifically? The plugin is built for v2.3.3 and I'm using the Docker elasticsearch:2.3.3 image. I'm struggling to see why any value beginning with 1xxxxxx works, but the moment it changes to 2xxxxxx the mappings stop working.

@kiwionly
Copy link
Owner

kiwionly commented Aug 5, 2016

Could you explain more, I think u should just leave the index version settings when creating index as ES check the versioning.

@daviddyball
Copy link
Author

If I set the index.version.created value in the index properties to be an elasticsearch version between 1000000 and 1999999 it works fine. The second I change it to match the actual version of Elasticsearch I'm using (2.3.3 == 2030399) it fails to apply the mapping and says the image in my index has unsupported parameters.

Example error when creating an index using elasticsearch_dsl + python:

import elasticsearch_dsl

class ImageField(elasticsearch_dsl.CustomField):
    name = 'image'
    builtin_type = 'image'

class MyDoc(elasticsearch_dsl.DocType):
    image = ImageField(**{'feature': {'JCD': {'hash': ['BIT_SAMPLING']}}})

index = elasticsearch_dsl.Index('test')
index.settings(**{'index.version.created': 2030399})
index.doc_type(MyDoc)
index.create()

Results in this error from elasticsearch_dsl:

RequestError: TransportError(
    400,
    u'mapper_parsing_exception', 
    u'Mapping definition for [image] has unsupported parameters: '
    [feature : {JCD={hash=[BIT_SAMPLING]}]'
)

The errors from Elasticsearch directly are pretty much the same:

MapperParsingException[Failed to parse mapping [product]: 
    Mapping definition for [raw_image] has unsupported parameters:
        [feature : {JCD={hash=[BIT_SAMPLING]}]];

Thanks,
D

@kiwionly
Copy link
Owner

kiwionly commented Aug 6, 2016

I check ES code it check the versioning, that why put that here to ensure it work.

You might want to review the code in ES.

@daviddyball
Copy link
Author

daviddyball commented Aug 11, 2016

Response from the Elasticsearch team:

it sounds like the author of the plugin is relying on 1.x features that have since been
removed. Sounds like you need to take it up with him

elastic/elasticsearch#19869

@kiwionly
Copy link
Owner

This plugin is port from ES 2.1 and I suspected the fork I using possible not port to index version more then 2 yet.

My first goal is to make it work, for the upgrade I still no plan, probably will take a look only when got time.

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

No branches or pull requests

2 participants