I do not believe that it will work as you have written it, unless you put an application in between to read that XML and then call Solr with what it expects. See http://wiki.apache.org/solr/UpdateXmlMessages
You need to have: <add> <doc> <field name="id">unique-value-if-any-1</field> <field name="field1">abc</field> <field name="commonunique">123</field> </doc> <doc> <field name="id">unique-value-if-any-2</field> <field name="field1">def</field> <field name="commonunique">123</field> </doc> <doc> <field name="id">unique-value-if-any-3</field> <field name="field1">ghi</field> <field name="commonunique">123</field> </doc> </add> -----Original Message----- From: kiran.bodigam [mailto:kiran.bodi...@gmail.com] Sent: Tuesday, October 18, 2011 6:15 AM To: solr-user@lucene.apache.org Subject: How to retreive multiple documents using one unique field? I have four different documents in single xml file(to be indexed), i don't want inject the unique field for each and every document .when i search with with the unique field all the four documents should come in result.i.e can common unique field should be applied to the all documents? My xml format : <add> <doc><field></field></doc> <doc><field></field></doc> <doc><field></field></doc> <doc><field></field></doc> <commonunique><id>123</id></commonunique> </add> If i search for 123 all the four documents should come Is it possible ? -- View this message in context: http://lucene.472066.n3.nabble.com/How-to-retreive-multiple-documents-using-one-unique-field-tp3430931p3430931.html Sent from the Solr - User mailing list archive at Nabble.com.