Is there a way or best practice to add more than one file (e.g. 2 pdfs and 1 doc) into one solr-index-doc using the extract handler? The result when querying should look somehow like this:
<result name="response">
<str name="id">123</str>
<doc>
<arr name="attr_content">
content of pdf-1
</arr>
</doc>
<doc>
<arr name="attr_content">
content of pdf-2
</arr>
</doc>
<doc>
<arr name="attr_content">
content of doc-1
</arr>
</doc>
</result>
In my java application I am adding files to the Solr-Index like that which adds only one file:
ContentStreamUpdateRequest up = new ContentStreamUpdateRequest("/update/extract");
up.addFile(new File("c:\\document1.pdf"));
up.setParam("literal.id", solrId);
up.setAction(AbstractUpdateRequest.ACTION.COMMIT, true, true);
solr.request(up);
It just allows one file to be attached as an attachment.
Solr does allow zip files to be indexed (patch), which would index the contents for the files.
So you can package the files into a zip and feed it Solr, which would be indexed as a Single document.