Skip to content

Commit

Permalink
scripts: fix objects indexation
Browse files Browse the repository at this point in the history
* Changes setup display

Co-Authored-by: Olivier DOSSMANN <git@dossmann.net>
  • Loading branch information
blankoworld committed Jan 10, 2020
1 parent 7110a77 commit c2ce015
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions scripts/setup
Original file line number Diff line number Diff line change
Expand Up @@ -188,26 +188,32 @@ info_msg "Generate fixtures:"

info_msg "- Organisations ${CREATE_LAZY} ${DONT_STOP}"
eval ${PREFIX} pipenv run invenio fixtures create --pid_type org ${DATA_PATH}/organisations.json --append ${CREATE_LAZY} ${DONT_STOP}
info_msg "Indexing Organisations:"
eval ${PREFIX} pipenv run invenio utils reindex -t org --yes-i-know

info_msg "- Libraries: ${CREATE_LAZY} ${DONT_STOP}"
eval ${PREFIX} pipenv run invenio fixtures create --pid_type lib ${DATA_PATH}/libraries.json --append ${CREATE_LAZY} ${DONT_STOP}
info_msg "Indexing Libraries:"
eval ${PREFIX} pipenv run invenio utils reindex -t lib --yes-i-know

info_msg "- Locations: ${CREATE_LAZY} ${DONT_STOP}"
eval ${PREFIX} pipenv run invenio fixtures create --pid_type loc ${DATA_PATH}/locations.json --append ${CREATE_LAZY} ${DONT_STOP}
info_msg "Indexing Locations:"
eval ${PREFIX} pipenv run invenio utils reindex -t loc --yes-i-know

info_msg "- Item types: ${CREATE_LAZY} ${DONT_STOP}"
eval ${PREFIX} pipenv run invenio fixtures create --pid_type itty ${DATA_PATH}/item_types.json --append ${CREATE_LAZY} ${DONT_STOP}
info_msg "Indexing Item types:"
eval ${PREFIX} pipenv run invenio utils reindex -t itty --yes-i-know

info_msg "- Patron types: ${CREATE_LAZY} ${DONT_STOP}"
eval ${PREFIX} pipenv run invenio fixtures create --pid_type ptty ${DATA_PATH}/patron_types.json --append ${CREATE_LAZY} ${DONT_STOP}
info_msg "Indexing Patron types:"
eval ${PREFIX} pipenv run invenio utils reindex -t ptty --yes-i-know

info_msg "- Circulation policies: ${CREATE_LAZY} ${DONT_STOP}"
eval ${PREFIX} pipenv run invenio fixtures create --pid_type cipo ${DATA_PATH}/circulation_policies.json --append ${CREATE_LAZY} ${DONT_STOP}
info_msg "Indexing Circulation policies:"
eval ${PREFIX} pipenv run invenio utils reindex -t cipo --yes-i-know
eval ${PREFIX} pipenv run invenio utils runindex --raise-on-error

Expand Down Expand Up @@ -265,19 +271,20 @@ fi

info_msg "- Holdings: ${HOLDINGS} ${CREATE_LAZY} ${DONT_STOP}"
eval ${PREFIX} pipenv run invenio fixtures create --pid_type hold --schema 'http://ils.rero.ch/schema/holdings/holding-v0.0.1.json' ${HOLDINGS} --append ${CREATE_LAZY} ${DONT_STOP}
info_msg "Indexing Holdings:"
eval ${PREFIX} pipenv run invenio utils reindex -t hold --yes-i-know
eval ${PREFIX} pipenv run invenio utils runindex -c 4 --raise-on-error

info_msg "- Items: ${ITEMS} ${CREATE_LAZY} ${DONT_STOP}"
eval ${PREFIX} pipenv run invenio fixtures create --pid_type item --schema 'http://ils.rero.ch/schema/items/item-v0.0.1.json' ${ITEMS} --append ${CREATE_LAZY} ${DONT_STOP}

# index items
info_msg "Index items"
info_msg "Indexing Items:"
eval ${PREFIX} pipenv run invenio utils reindex -t item --yes-i-know
eval ${PREFIX} pipenv run invenio utils runindex -c 4 --raise-on-error

# index documents
info_msg "Index Documents:"
info_msg "Indexing Documents:"
eval ${PREFIX} pipenv run invenio utils reindex -t doc --yes-i-know
eval ${PREFIX} pipenv run invenio utils runindex -c 4 --raise-on-error

Expand Down

0 comments on commit c2ce015

Please sign in to comment.