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

tripal_elasticsearch - Elasticsearch 7.10 - Website Nodes Index error #271

Open
erikattechslice opened this issue Nov 17, 2020 · 6 comments

Comments

@erikattechslice
Copy link

I am using the latest elasticsearch (7.10.0), elasticsearch-php 7.x, and tried both master and 7.x-2.3 versions of tripal-elasticsearch. I did start running into issues with creating tripal indices for elasticsearch. Keep getting errors trying to create indices. Any help would be appreciated

I tried following the tripal-elasticsearch install documentation. I tried to create the default indices and this is where I started encountering problems.

On this page: https://github.com/tripal/tripal_elasticsearch/blob/master/docs/default-indices.md I started trying to create the"Website Nodes". This gave me the following error:

{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"The [standard] token filter has been removed."}],"type":"illegal_argument_exception","reason":"The [standard] token filter has been removed."},"status":400}

When I started looking into this error. it lead me to: https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking-changes-7.0.html

which looks the standard token filter was removed in 7.0. I went into this file that created the index
\sites\all\modules\tripal_elasticsearch\includes\tripal_elasticsearch.indices.form.inc

and removed the 'standard' from the token_filters' so

$token_filters = drupal_map_assoc([
'standard',
'lowercase',
]);

became:

$token_filters = drupal_map_assoc([
'lowercase',
]);

This got me a little farther to a new error:

{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"Root mapping definition has unsupported parameters: [default : {properties={nid={type=integer, fields={raw={type=integer}}}, type={type=text, fields={raw={type=text}}}, title={type=text, fields={raw={type=text}}}, content={type=text, fields={raw={type=text}}}}}]"}],"type":"mapper_parsing_exception","reason":"Failed to parse mapping [_doc]: Root mapping definition has unsupported parameters: [default : {properties={nid={type=integer, fields={raw={type=integer}}}, type={type=text, fields={raw={type=text}}}, title={type=text, fields={raw={type=text}}}, content={type=text, fields={raw={type=text}}}}}]","caused_by":{"type":"mapper_parsing_exception","reason":"Root mapping definition has unsupported parameters: [default : {properties={nid={type=integer, fields={raw={type=integer}}}, type={type=text, fields={raw={type=text}}}, title={type=text, fields={raw={type=text}}}, content={type=text, fields={raw={type=text}}}}}]"}},"status":400}

looking into this error lead me to https://www.elastic.co/guide/en/elasticsearch/reference/current/removal-of-types.html

where it says default has been removed.

Thanks again
-Erik

@bradfordcondon
Copy link
Member

I'd guess this module supports up to 6.x for elasticsearch. I'd start your troubleshooting by downgrading.

if @almasaeed2010 can confirm we should also update documentation.

@almasaeed2010
Copy link
Contributor

As of right now, we only support up to ES 6.

Thanks!

@erikattechslice
Copy link
Author

Thanks for the responses. Do you have an idea of what will need to change to support ES7?

@almasaeed2010
Copy link
Contributor

Hello @erikattechslice. sorry for the delay.

We plan on upgrading this module to offer better support for ES7. Looks like the first opportunity we'll have to work on this is sometime early Jan.

We also would welcome PRs/contributions if you need this support faster!

@erikattechslice
Copy link
Author

Hi @almasaeed2010

I am looking to help contribute. Our customer wants to use this module with ES7. We were just looking to provide an estimate of how much work it will take to update this module to ES7 might take so we can roadmap that work out. Thanks again!

@almasaeed2010
Copy link
Contributor

I am not entirely sure why this error is happening but I would start looking in the ESInstance class where indices get created. In particular, line 295 might need removing the _default_ key from the array. You could also attempt to upgrade the elasticsearch-php library that is located in sites/all/libraries. You'll only need to update the composer.json file to upgrade to 7 and run composer update if you haven't already done so.

Please let me know if you encounter other issues! I'lll try to help as much as I can :)

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

3 participants