-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update index script to actually wipe an existing index
- Loading branch information
1 parent
437cd74
commit a2f513f
Showing
2 changed files
with
11 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
# Powershell script for Windows 10 and above to index the TMDB JSON file. | ||
|
||
# delete (or wipe) the tmdb index and reindex | ||
Invoke-WebRequest -Method POST -Uri 'http://localhost:8983/solr/tmdb/update' -Body '<delete><query>*:*</query></delete>' -Content-type 'text/xml; charset=utf-8' | ||
|
||
Invoke-WebRequest -Method POST -Uri 'http://localhost:8983/solr/tmdb/update' -Body '<commit/>' -ContentType 'text/xml; charset=utf-8' | ||
|
||
|
||
$data = Get-Content 'tmdb_solr_file.json' | ||
Invoke-WebRequest -Method POST -Uri 'http://localhost:8983/solr/tmdb/update' -ContentType 'application/json' -UseBasicParsing -Body $data |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
#!/bin/bash | ||
|
||
# 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://localhost: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' |