0.12.3
Pre-release
Pre-release
- Sync geo data between mongo and elasticsearch. For changes to take effect - need to run the
ensure_required_metadata
script on all items. - sync of family trees to elasticsearch + searching persons as part of general search (#33)
- persons collection is synced to elasticsearch
- only persons considered as deceased are synced (according to existing is_living_person logic)
- api v1/search endpoint supports persons
- see api documentation for details - http://devapi.dbs.bh.org.il/v1/docs
- persons collection is synced to elasticsearch
- misc. improvements to migration process
- ensure correct id for items on elasticsearch
- normalize data when updating ES - set correct gender, place fields, etc.. - to ensure everything is indexed correctly on elasticsearch for searching
- header field is added for persons (based on name) - for seamless suggest / searching support
- changes to ensure_required_metadata script:
- added --index argument that allows to update a different elasticsearch index then the default
- this allows to migrate and re-index elasticsearch while existing index still works and switch instantly to the new and updated index
- misc. refactoring and improvements
- added --index argument that allows to update a different elasticsearch index then the default
- improvements to api docs
- moved to docs/_build/index.html - to allow to use the docs directory for simple .md files
- added scripts/make_docs.sh to make the docs
- removed old stuff from docs, fixed details to be more minimal and specific to what is relevant and known to work
- added api docs for persons search
deployment to dev
- edit nginx conf - change the docs alias
- sudo nano /etc/nginx/sites-available/bhs_api
- add _build to the docs alias
- edit
/etc/bhs/app_server.yaml
- add attribute elasticsearch_data_index with value of the mongo db name
- create new elasticsearch index
scripts/elasticsearch_create_index.py --index mojp-dev-`date +%Y-%m-%d`
- copy all items from mongo to the new ES index
scripts/ensure_required_metadata.py --add --index mojp-dev-`date +%Y-%m-%d`
- had to manually delete some invalid data from mongo:
- db.persons.remove({"_id": ObjectId('581f46d776f102629df5eb8f')})
- switch the ES index alias to the new index
- if the current index is not an alias, you will have to delete, then alias
curl -X DELETE bhs-dev-db:9200/mojp-dev
curl -X PUT bhs-dev-db:9200/mojp-dev-`date +%Y-%m-%d`/_alias/mojp-dev
- if you already have an alias, you can switch in one command
curl -gX POST localhost:9200/_aliases --data '{"actions":[{"remove":{"index":"*","alias":"mojp-dev"}},{"add":{"index":"mojp-dev-'`date +%Y-%m-%d`'","alias":"mojp-dev"}}]}'
- if the current index is not an alias, you will have to delete, then alias