Updating Solr field while posting .pdf document in

2019-07-24 21:20发布

问题:

I want to post and index a PDF document while also updating a custom field I created. Basically, I want users to be able to enter tags before they upload a document.

I added a multiValued "tags" field to my managed-schema file:

<field name="tags" type="string" multiValued="true" indexed="true" required="true" stored="true"/>

I have tried the curl commands for posting data, but they do not work for me. So far, this is the only command that I can post with that works:

java -Dauto -Dc=NameOfCore -Drecursive -jar example/exampledocs/post.jar  C:/Path/To/My/File.pdf

I tried this variation:

java -Dauto -Dc=NameOfCore -Drecursive -jar example/exampledocs/post.jar  C:/Path/To/My/File.pdf -params "literal.tags=test tag"

But this returns errors:

SimplePostTool: WARNING: No files or directories matching literal.tags=test tag

Is there a way to post and index a document while simultaneously updating a field on windows without the use of curl?