[ https://issues.apache.org/jira/browse/SOLR-6003?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13981280#comment-13981280 ]
Hoss Man commented on SOLR-6003: -------------------------------- bq. With this schema, if I do an atomic update to field A on a given document, say, {a : {set : "newvalue"}}, I will lose information in the index about field B for that document. Correct? Correct: but that may have been your intent when designing that schema. You may have set it up that way precisely because you know that anytime you update a document you will either be explicitly supplying a replacement value for field "b", or deliberately excluding a value for field "b" so that the current field goes away. This is what i was refering to in my earlier comment... bq. ...or the use cases i've seen in the wild where users deliberately have non-stored fields (to save space) that they might replace with new values on atomic update, or they just leave the field out of the update as a way to remove the value. (a deliberate choice of one or the other is made by their update client on every update) just because an atomic update causes information to be removed from a non-stored field, doesn't mean that removal isn't a deliberate part o the use case --- bq. This specific Jira should focus on the specific issue of "increment" for a non-stored field, and "append" to a non-stored multivalued field. Clearly this case should produce an exception since it can't possibly do anything reasonable since it needs to access the previous value before applying the increment or append. Agreed - we can't, in general, make assumptions about failing _any_ atomic update just because some fields in the schema aren't stored -- but i don't see any reason why we can't fail in some _specific_ cases of things like "inc" or "remove" directly on non-stored fields. (I'm surprised we aren't already) > JSON Update increment field with non-stored fields causes subtle problems > ------------------------------------------------------------------------- > > Key: SOLR-6003 > URL: https://issues.apache.org/jira/browse/SOLR-6003 > Project: Solr > Issue Type: Bug > Components: update > Affects Versions: 4.7.1 > Reporter: Kingston Duffie > > In our application we have large multi-field documents. We occasionally need > to increment one of the numeric fields or add a value to a multi-value text > field. This appears to work correctly using JSON update. But later we > discovered that documents were disappearing from search results and > eventually found the documentation that indicates that to use field > modification you must store all fields of the document. > Perhaps you will argue that you need to impose this restriction -- which I > would hope could be overcome because of the cost of us having to store all > fields. But in any case, it would be better for others if you could return > an error if someone tries to update a field on documents with non-stored > fields. -- This message was sent by Atlassian JIRA (v6.2#6252) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org