elasticsearch-perl
elasticsearch-perl copied to clipboard
Mapping type required by module, not allowed in ES 7.0
Upgrading my cluster to ES7.0 rendered the perl module with support for only ES 6.0 useless.
The 'type' parameter for index mapping is required by the module, but ES 7.0 refuses it.
The 'include_type_name' param for put_mapping is not accepted by the module.
Yep, I will be getting a 7.0 compatible version out soonish. In the meantime you can just set the type
to _doc
.
We're also waiting to upgrade to 7.0 based on this module. Any update?
We also need a upgrade of the perl module for V7 of Elasticsearch, some heavy script are used to load elastic, I will try type _doc change Thanks
Last release was 2 years ago, would be nice if we could get official ESv7 compatibility without needing to use hacks and workarounds in our code base.
@clintongormley, @ezimuel, @philkra (sorry to spam, not sure who's in charge now): is there anything community could do to help out to make v7 support happen sooner than later? We appreciate y'alls hard work so far! I think we can allocate some company resources towards this and make some PR if you think it would be useful, just don't want to duplicate efforts.
Please let us know what would be a good plan of attack. Thanks!
Cheers
@slobo I'm the new maintainer of this library. I know your frustration, I'll be able to starting release update for the Perl client next year. We'll definitely need help from the community.
The main step is to update the code generator from the Elasticsearch API specification ver 7.0.
The scripts for code generator are in /build
folder. As you can see, we have different script for each ES version. I'm working on the new one parse_spec_7_0.pl
. This script will generate all the information needed for building the HTTP request for each endpoint. The output is the API.pm (this is for ES 6.0), the generated code is inside the === AUTOGEN - START ===
and === AUTOGEN - END ===
part.
As you can imagine this step is quite long to accomplish and without this we cannot actually release the new client for 7.x. I'll ask for code review and the community can help me a ton. I'll update you soon and thanks again for your patience.
@slobo going into the direction of 7.x release. I just released a dev version for Elasticsearch 6.8.7. I'll release the stable 6.80 in a week and after focusing on 7.x. I did some refactor and added integration tests, so I'll expect to have it soon. Sorry for my late reply.
No worries, thanks for all your hard work and for releasing 6.80 - we moved our dev branch to it :)
Hello everybody. It there any news for the module and ES 7? We are using ES 7.8 and need the perl module in one of our monitoring plugins. I'm glad to hear from you soon. Thanks you in advance Best regards Danny
We just released a dev version 7.30_1 supporting Elasticsearch 7.3 APIs. Please check this version and let me know, thanks!
I see 7.30 on CPAN, but the docs regarding mappings haven't changed, and AFAIK the code from the example does not work.
Are only the docs outdated? Or is the code still not working with the new ES 7 API?
@domm, the docs are outdated, the code is updated with Elasticsearch 7.3 API specification. We need to update the docs asap. Right now I'm working on updating the code with the upcoming version 7.10 of Elasticsearch.
@domm, the docs are outdated, the code is updated with Elasticsearch 7.3 API specification. We need to update the docs asap. Right now I'm working on updating the code with the upcoming version 7.10 of Elasticsearch.
ok, I got it working now by ignoring the CPAN docs and using ES API docs..
this works (note the extra param, changing type
to _doc
and changing string
to text
):
$indices->put_mapping(
index => 'test',
type => '_doc',
params=>{
include_type_name=>'true',
},
body => {
'_doc' => {
properties => {
name => { type => 'text' },
age => { type => 'integer' }
}
}
}
);
but I get a warning: Using include_type_name in put mapping requests is deprecated.