Created
February 18, 2019 15:32
-
-
Save horaciod/03884083c305bd7eb13c09b240c836a5 to your computer and use it in GitHub Desktop.
Update / Add fields in solr index based in search (agregar o modificar registros en un indice solr usando un resultado de búsqueda
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/bash | |
| # primer parametro que buscar ej: country_str:argentina | |
| # segundo parametro que archivo de template utilizar. ej: chile.j | |
| ##### archivo template | |
| ##### { "id": .id , country_str:{"set":"Chile" }} | |
| echo "$2 en portal '$1'" | |
| solrdump -verbose -server http://localhost:8389/solr/biblio -q "$1" -fl 'id' |jq -f $2 -c >update.json | |
| solrbulk -server http://localhost:8389/solr/biblio update.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment