: I'm working with the Pecl package, with Solr 4.3.1. I have a doc defined in my ... : $client = new SolrClient($options); : $doc = new SolrInputDocument(); : $doc->addField('id', 12345); : $doc->addField('description', 'This is the content of the doc'); : $updateResponse = $client->addDocument($doc); : : When I do this, the doc is not added to the index, and I get the following : error in the logs in admin : : Unknown attribute id in add:allowDups
"id" is a red herring here -- it's not refering to your "id" field it's refering to the fact that an XML attribute node exists with an "XML id" that it doesn't recognize. or to put it another way: Pecl is generating an <add> xml element that contains an attribute like this: allowDups="false|true" ...and solr doesn't know what to do with that. "allowDups" was an option that existed prior to 4.0, but is no longer supported (the "overwrite" attribute now takes it's place) So my best guess is that the Pecl code you are using was designed for 3.x, and doesn't entirely work correctly with 4.x. the warning you are getting isn't fatal or anything -- it's just letting you know that unknown attribute is being ignored -- but you may want to look into wether there is an updated Pecl library (for example: if you really wanted to use allowDups="true" you should now be using overwrite="false" and maybe the newer version of your client library will let you) I've updated some places in the ref guide and wiki were it wasn't obvious that allowDups is gone, gone, gone ... i'll also update that error message so it will be more clear starting in 4.6... https://issues.apache.org/jira/browse/SOLR-5257 -Hoss