I am running Solr on Windows7 and cannot use Curl on cmd so I am using post.jar. (Yes I use Cygwin and Mingw but would like to stick to cmd.exe for this scenario).
Is there a way that I can add a document via post.jar by its tags directly at the command instead of creating an xml document and then adding that xml doc to the command?
Specifically, if I add the following tags in an xml file, the document gets uploaded beautifully:
<add><doc><field name="id">50</field><field name="title">Test Title</field><field name="author">Dan</field><field name="content">Test using post.jar </field></doc></add>
However, if I try to add the same tags at the command it sends me a bad request error:
Input at Cmd:
java -Ddata=args -jar post.jar "<add><doc><field name="id">50</field><field name="title">Test Title</field><field name="author">Dan</field><field name="content">
Test using post.jar </field></doc></add>"
Returns:
SimplePostTool: FATAL: Solr returned an error: Bad Request
I cannot find any documentation or examples on adding data to solr via post.jar without it being an external xml file. Deleting works great though:
java -Ddata=args -jar post.jar '<delete><id>42</id></delete>'
Thank you in advance.