apache / incubator-ponymail

Apache Pony Mail (Incubating) - Email for Ponies & People
http://ponymail.incubator.apache.org/
Other
80 stars 30 forks source link

Upgrade to Elasticsearch 7.X #528

Closed lewismc closed 3 years ago

lewismc commented 3 years ago

The installation prerequisites state ElasticSearch >= 2.1 but requirements.txt states ~=5.0.0. When I attempt to run setup.py in Python3 interpreter with local ES 7.7.1 installation I get the following

Index creation failed: TransportError(400, 'mapper_parsing_exception', 'Root mapping definition has unsupported parameters:  [mailinglists : {_all={enabled=false}, properties={name={index=not_analyzed, type=string}, description={index=not_analyzed, type=string}, list={type=string}}}] [attachment : {properties={source={type=binary}}}] [mbox_source : {_all={enabled=false}, properties={message-id={index=not_analyzed, type=string}, mid={type=string}, source={type=binary}}}] [mbox : {properties={cc={type=string}, date={format=yyyy/MM/dd HH:mm:ss, index=not_analyzed, store=true, type=date}, in-reply-to={index=not_analyzed, type=string}, private={type=boolean}, attachments={properties={filename={index=not_analyzed, type=string}, content_type={index=not_analyzed, type=string}, size={type=long}, hash={index=not_analyzed, type=string}}}, references={type=string}, from_raw={index=not_analyzed, type=string}, subject={fielddata=true, type=string}, mid={type=string}, @import_timestamp={format=yyyy/MM/dd HH:mm:ss||yyyy/MM/dd, type=date}, epoch={index=not_analyzed, type=long}, body={type=string}, list={type=string}, message-id={index=not_analyzed, type=string}, from={type=string}, to={type=string}, list_raw={index=not_analyzed, type=string}}}] [account : {_all={enabled=false}, properties={internal={properties={cookie={index=not_analyzed, type=string}, ip={index=not_analyzed, type=string}, oauth_used={index=not_analyzed, type=string}}}, credentials={properties={uid={index=not_analyzed, type=string}, altemail={type=object}, fullname={index=not_analyzed, type=string}, email={index=not_analyzed, type=string}}}, request_id={index=not_analyzed, type=string}, cid={index=not_analyzed, type=string}}}] [notifications : {_all={enabled=false}, properties={date={format=yyyy/MM/dd HH:mm:ss, store=true, type=date}, in-reply-to={index=not_analyzed, type=string}, private={type=boolean}, subject={fielddata=true, type=string}, mid={type=string}, epoch={type=long}, list={type=string}, type={index=not_analyzed, type=string}, seen={type=long}, recipient={index=not_analyzed, type=string}, message-id={index=not_analyzed, type=string}, from={type=string}, to={type=string}}}]')

This has to do with the removal of mapping types in ES 7.X

I propose to make necessary upgrades to ES 7.X. I will start working on this issue.

Humbedooh commented 3 years ago

https://github.com/apache/incubator-ponymail-foal works with 7.x and 8.x, and is the focus at the moment.

lewismc commented 3 years ago

Hi @Humbedooh thanks for dropping that bombshell. This wasn't obvious to me... I just spent the last 4 hours upgrading this codebase to use ES7. No worries, I'll send a one line README PR to notify others as well. Thanks