mirror of
https://github.com/metabrainz/musicbrainz-server.git
synced 2025-03-14 10:15:22 +00:00
Allow using another scheme than HTTP to query the search server through `SEARCH_SCHEME` definition. More specifically, allow for using HTTPS when the search server isn’t deployed in the same infrastructure.
36 lines
672 B
Bash
Executable File
36 lines
672 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
cd "$(dirname "${BASH_SOURCE[0]}")/../"
|
|
|
|
SEARCH_SCHEME=$(perl -Ilib -e 'use DBDefs; print DBDefs->SEARCH_SCHEME;')
|
|
SEARCH_SERVER=$(perl -Ilib -e 'use DBDefs; print DBDefs->SEARCH_SERVER;')
|
|
|
|
declare -a SOLR_CORES
|
|
SOLR_CORES=(
|
|
annotation
|
|
artist
|
|
area
|
|
cdstub
|
|
editor
|
|
event
|
|
instrument
|
|
label
|
|
place
|
|
recording
|
|
release
|
|
release-group
|
|
series
|
|
tag
|
|
url
|
|
work
|
|
)
|
|
|
|
for CORE in "${SOLR_CORES[@]}"; do
|
|
curl -sSL \
|
|
"$SEARCH_SCHEME://$SEARCH_SERVER/$CORE/update?softCommit=true" \
|
|
--header 'Content-type: text/xml' \
|
|
--data-binary '<delete><query>*:*</query></delete>'
|
|
done
|