[
https://issues.apache.org/jira/browse/SOLR-139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12470035
]
Ryan McKinley commented on SOLR-139:
------------------------------------
SOLR-139-IndexDocumentCommand.patch adds a new command to UpdateHandler and
deprecates 'AddUpdateCommand'
This patch is only concerned with adding updateability to the UpdateHandler, it
does not deal with how request handlers specify what should happen with each
field.
I added:
public class IndexDocumentCommand
{
public enum MODE {
OVERWRITE, // overwrite existing values with the new one. (the default
behavior)
APPEND, // add the new value to existing value
DISTINCT, // same as APPEND, but make sure each value is distinct
INCREMENT, // increment existing value. Must be a number!
REMOVE // remove the previous value.
};
public boolean overwrite = true;
public SolrDocument doc;
public Map<SchemaField,MODE> mode; // What to do for each field. null is the
default
public int commitMaxTime = -1; // make sure the document is commited within
this much time
}
RequestHandlers will need to fill up the 'mode' map if they want to support
updateability. Setting the mode.put( null, APPEND ) sets the default mode.
> Support updateable/modifiable documents
> ---------------------------------------
>
> Key: SOLR-139
> URL: https://issues.apache.org/jira/browse/SOLR-139
> Project: Solr
> Issue Type: Improvement
> Components: update
> Reporter: Ryan McKinley
> Attachments: SOLR-139-IndexDocumentCommand.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.
-
You can reply to this email to add a comment to the issue online.