On 3/20/23 07:57, s...@cid.is wrote:
This works fine on *ix:
curl 'http://localhost:8983/solr/my_core/update?commit=true' -d
'<delete><query>*:*</query></delete>'
These 2 do not work on Windows:
1) C:\solr-9.1.1> java -Dc=my_core -Drecursive=yes -Dauto -jar
example\exampledocs\post.jar '<delete><query>*:*</query></delete>'
2) PS C:\solr-9.1.1> java -Dc=my_core bin\post
'<delete><query>*:*</query></delete>'
The SimplePostTool is designed for indexing FILES to Solr, not a text
string. It is trying to interpret that XML data as a filename.
If you put that XML content into a file with an xml extension and run
command number 1 with the path to that file instead of the xml data in
single quotes, it will work.
Command number 2 is invalid. Wherever you saw that is sharing incorrect
information.
Or you can use curl on Windows.
Windows 10 and later come with curl. But it has very different options
compared to "standard" curl, and I haven't worked out how to change it
to work with that command.
If you install Git for Windows, then you can run Git Bash and use curl
in that prompt just like you're used to on *NIX platforms. It even
includes perl.
Or you can get curl for Windows. https://curl.se/windows/
Thanks,
Shawn