Skip to content

Commit

Permalink
Parameterizing the hostname for indexing and defaulting to localhost. (
Browse files Browse the repository at this point in the history
…#24)

Co-authored-by: Kevin Risden <[email protected]>
  • Loading branch information
jzonthemtn and risdenk authored Feb 3, 2022
1 parent 693f91a commit 8be15df
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions index.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
#!/usr/bin/env bash

HOSTNAME=${1:-localhost}

if [ ! -f ./tmdb_solr.json ]; then
unzip tmdb_solr.json.zip
fi

# delete (or wipe) the tmdb index and reindex
curl http://localhost:8983/solr/tmdb/update --data '<delete><query>*:*</query></delete>' -H 'Content-type:text/xml; charset=utf-8'
curl "http://$HOSTNAME:8983/solr/tmdb/update" --data '<delete><query>*:*</query></delete>' -H 'Content-type:text/xml; charset=utf-8'

curl http://localhost:8983/solr/tmdb/update --data '<commit/>' -H 'Content-type:text/xml; charset=utf-8'
curl "http://$HOSTNAME:8983/solr/tmdb/update" --data '<commit/>' -H 'Content-type:text/xml; charset=utf-8'

curl 'http://localhost:8983/solr/tmdb/update?commit=true' --data-binary @tmdb_solr.json -H 'Content-type:application/json'
curl "http://$HOSTNAME:8983/solr/tmdb/update?commit=true" --data-binary @tmdb_solr.json -H 'Content-type:application/json'

0 comments on commit 8be15df

Please sign in to comment.