Unless you have *evidence* that the indexing each pdf with the form data as a single SOLR document is a problem, I would just index the fields with each document rather than try to index the PDFs as multivalued. The space used by duplicating the form field data is probably a tiny fraction of the data you'll index and the space savings are probably not worth the complications.
Erick 2010/2/16 Kranti™ K K Parisa <kranti.par...@gmail.com> > Hi, > > When we index using SOLR, we have an option called multivalued. How does > that work with multiple files associated with same document. > > For example: submiting a form with some fields + list of pdf files > index process: > 1) considering all the form fields as individual solr input document fields > (using setField) > 2) getting contents of the pdf files and addiing them to a field called > contents which is declared as multivalued (using addField) > > So now when we search for something, and assume the search text has been > found in the second file, how can we display the file name? > I know we have to store the file name also as a field to get the file > names, > but how does that work with multivalued fields. > > Is there any way to achieve this? One way could be indexing solr input > documents for each file, but my concern is that would duplicate the other > form fields data. > > Best Regards, > Kranti K K Parisa >