You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Ryan McKinley (JIRA)" <ji...@apache.org> on 2007/09/08 22:52:29 UTC

[jira] Commented: (SOLR-139) Support updateable/modifiable documents

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

Ryan McKinley commented on SOLR-139:
------------------------------------

I'm back and have some time to focus on this...  Internally, I need to move the document modification to the update handler, but before I get going it would be nice to agree what we want the external interface to look like.

- - -

Should we deprecate the AddUpdateCommand and replace it with something else? Do we want one command to do Add/Update/Modify?  Two?

- - - 

what should happen if you "modify" a non-existent document?
a. error -- makes sense in a 'tagging' context
b. treat it as an add -- makes sense in a "keep these fields up to date" context (i don't want to check if the document already exists or not)

I happen to be working with context b, but I suspect 'a' makes more sense.

- - - 

Should we have different xml syntax for document modification vs add?  Erik suggested:

<update overwrite="title" distinct="cat">
 ...
</update>

since 'update' is already used in a few ways, maybe <modify>?

Should we put the id as an xml attribute?  this would make it possible to change the unique key.
  <modify id="ID">
   <field name="id">new id</field>
  </modify>
That may look weird if the uniqueKeyField is not called "id"

Assuming we put the modes as attributes, I guess multiple fields would be comma delimited?
 <modify distinct="cat,keyword">

Do you like the default mode called "default" or "mode"?
<modify id="ID" default="overwrite">?
<modify id="ID" mode="overwrite">?











> 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
>            Assignee: Ryan McKinley
>         Attachments: Eriks-ModifiableDocument.patch, Eriks-ModifiableDocument.patch, getStoredFields.patch, getStoredFields.patch, getStoredFields.patch, getStoredFields.patch, getStoredFields.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-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.
-
You can reply to this email to add a comment to the issue online.