genouest / biomaj

BioMAJ
http://genouest.github.io/biomaj/
GNU Affero General Public License v3.0
12 stars 10 forks source link

'Elasticsearch' object has no attribute 'delete_by_query' #24

Closed ledeemax closed 8 years ago

ledeemax commented 8 years ago

Hello,

I get an error when I try to remove-all a bank :

[root@vm0121 biomaj]# biomaj-cli.py --config $BIOMAJ_CONF --bank taxonomy --remove-all
Log file: none
'Elasticsearch' object has no attribute 'delete_by_query'

Before launching this command, the command (from mongo biomaj) db.banks.find({name:'taxonomy'}).pretty() displays information of this bank, and the repertory $data.dir/pub/taxonomy/ contains data.

After launching, db.banks.find({name:'taxonomy'}).pretty() command doesn't display information, but $data.dir/pub/taxonomy/ contains again data.

I tested with BioMAJ v3.0.10 and Elasticsearch versions 1.7.2 and 1.7.3, /etc/elasticsearch/elasticsearch.yml file configurated, same problem.

Thanks

osallou commented 8 years ago

delete_by_query has been deprecated according to doc. :-( , so it depends on elastic version. I use an older one. I will update the code to fix this. In the meanwhile, if you don t really need elasticsearch, you can unset it in global config. I expect to get a fix on monday at max.