[ 
https://issues.apache.org/jira/browse/SOLR-172?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ryan McKinley updated SOLR-172:
-------------------------------

    Attachment: SOLR-172-uniqueKey-NPE.patch

Updated patch in responce to discussion.  This version:

1. Throws a nice exception if the add command is overwrite and the document 
does not contain a key.

2.  Does *not* throw an exception if there you call addDups()

3. rewrites all 'addDocs' commands where there is no unique key in the schema 
to be 'allowDups'




> add doc without uniqueKey field causes NPE
> ------------------------------------------
>
>                 Key: SOLR-172
>                 URL: https://issues.apache.org/jira/browse/SOLR-172
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Hoss Man
>         Attachments: SOLR-172-uniqueKey-NPE.patch, 
> SOLR-172-uniqueKey-NPE.patch
>
>
> as mentioned in email by otis...
> SimplePostTool: WARNING: Unexpected response from Solr: '<result
> status="1">java.lang.NullPointerException
>         at 
> org.apache.solr.schema.FieldType.storedToIndexed(FieldType.java:248)
>         at 
> org.apache.solr.update.UpdateHandler.getIndexedId(UpdateHandler.java:134)
>         at
> org.apache.solr.update.DirectUpdateHandler2.overwriteBoth(DirectUpdateHandler2.java:380)
> ...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to