Skip to content

Instantly share code, notes, and snippets.

@matejskubic
Created May 22, 2012 20:36
Show Gist options
  • Save matejskubic/2771456 to your computer and use it in GitHub Desktop.
Save matejskubic/2771456 to your computer and use it in GitHub Desktop.
post batch script for Solr examples for windows
@echo off
setlocal
set URL=http://localhost:8983/solr/update
FOR %%a IN (%1) DO (
echo Posting file %%a to %URL%
curl %URL% --data-binary @%%a -H "Content-type:application/xml"
)
curl %URL% --data-binary "<commit/>" -H "Content-type:application/xml"
endlocal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment