On 10 June 2013 17:47, Roland Everaert <reveatw...@gmail.com> wrote: > Hi, > > Based on the wiki, below is an example of how I am currently adding a pdf > file with an extra field called name: > curl " > http://localhost:8080/solr/update/extract?literal.id=doc10&literal.name=BLAH&defaultField=text" > --data-binary @/path/to/file.pdf -H "Content-Type: application/pdf" > > Is it possible to add a file + any extra fields using a JSON or XML request.
It is not entirely clear what you are asking. Do you mean can one do the same as your example above for a PDF file, but with a XML or JSON file? If so, yes. Please see the examples in example/exampledocs/ of a Solr source tree, and http://wiki.apache.org/solr/ExtractingRequestHandler Regards, Gora