[ 
https://issues.apache.org/jira/browse/SOLR-139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13485544#comment-13485544
 ] 

Joel Nothman commented on SOLR-139:
-----------------------------------

Hi,

I'm a fan of the feature, but not really a fan of the syntax, for the following 
reasons:

* It is extremely verbose for batch update operations, e.g. setting a new field 
on all documents in the index. Surely the update modes should be specified 
outside of each individual record (either as URL query parameters, or in some 
content header/wrapper). The current approach is entirely inappropriate for 
extending to CSV, which might otherwise be an obvious choice of format when  
adding a single field to each of a set of objects. 
* The distinction between an "insert" and an "update" operation (in SQL terms) 
is implicit, only indicated by the presence of an object in a JSON value, or by 
the presence of update in any one of the specified fields. Since insert and 
update operations are quite distinct on the server, it should select between 
these on a per-request basis, not per-record.
* The JSON syntax would appear as if one could extend {"set":100} to 
{"set":100,"inc":2} on the same field, which is nonsense. It uses JSON a object 
for inappropriate semantics, where what one actually means is 
{"op":"set","val":100}, or even {"name":"price","op":"set","val":100}.
* It may be worth reserving JSON-object-as-value for something more literal in 
the future.
                
> Support updateable/modifiable documents
> ---------------------------------------
>
>                 Key: SOLR-139
>                 URL: https://issues.apache.org/jira/browse/SOLR-139
>             Project: Solr
>          Issue Type: New Feature
>          Components: update
>            Reporter: Ryan McKinley
>             Fix For: 4.1
>
>         Attachments: Eriks-ModifiableDocument.patch, 
> Eriks-ModifiableDocument.patch, Eriks-ModifiableDocument.patch, 
> Eriks-ModifiableDocument.patch, Eriks-ModifiableDocument.patch, 
> Eriks-ModifiableDocument.patch, getStoredFields.patch, getStoredFields.patch, 
> getStoredFields.patch, getStoredFields.patch, getStoredFields.patch, 
> SOLR-139_createIfNotExist.patch, SOLR-139-IndexDocumentCommand.patch, 
> SOLR-139-IndexDocumentCommand.patch, SOLR-139-IndexDocumentCommand.patch, 
> SOLR-139-IndexDocumentCommand.patch, SOLR-139-IndexDocumentCommand.patch, 
> SOLR-139-IndexDocumentCommand.patch, SOLR-139-IndexDocumentCommand.patch, 
> SOLR-139-IndexDocumentCommand.patch, SOLR-139-IndexDocumentCommand.patch, 
> SOLR-139-IndexDocumentCommand.patch, SOLR-139-IndexDocumentCommand.patch, 
> SOLR-139-ModifyInputDocuments.patch, SOLR-139-ModifyInputDocuments.patch, 
> SOLR-139-ModifyInputDocuments.patch, SOLR-139-ModifyInputDocuments.patch, 
> SOLR-139.patch, SOLR-139.patch, SOLR-139-XmlUpdater.patch, 
> SOLR-269+139-ModifiableDocumentUpdateProcessor.patch
>
>
> It would be nice to be able to update some fields on a document without 
> having to insert the entire document.
> Given the way lucene is structured, (for now) one can only modify stored 
> fields.
> While we are at it, we can support incrementing an existing value - I think 
> this only makes sense for numbers.
> for background, see:
> http://www.nabble.com/loading-many-documents-by-ID-tf3145666.html#a8722293

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to