lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan McKinley (JIRA)" <j...@apache.org>
Subject [jira] Commented: (SOLR-139) Support updateable/modifiable documents
Date Sun, 04 Feb 2007 19:22:05 GMT

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

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

> 
> If the field modes were parameters, they could be reused for other update handlers like
SQL or CSV
> Perhaps something like:
> /update/xml?modify=true&f.price.mode=increment,f.features.mode=append
> 

Yes.  I think we should decide a standard 'modify modes' syntax that can be used across handlers.
 In this example, I am using the string:

mode=cat=DISTINCT,features=APPEND,price=INCREMENT,sku=REMOVE,OVERWRITE

and passing it to 'parseFieldModes' in XmlUpdateRequestHandler.

Personally, I think all the modes should be specified in a single param rather then a list
of them.  I vote for a syntax like:

<lst name="params">
 <str name="mode">cat=DISTINCT,features=APPEND,price=INCREMENT,sku=REMOVE,OVERWRITE</str>
</lst>
 or:
<lst name="params">
 <str name="mode">cat:DISTINCT,features:APPEND,price:INCREMENT,sku:REMOVE,OVERWRITE</str>
</lst>

rather then:

<lst name="params">
 <str name="f.cat.mode">DISTINCT</str>
 <str name="f.features.mode">APPEND</str>
 <str name="f.price.mode">INCREMENT</str>
 <str name="f.sku.mode">REMOVE</str>
 <str name="modify.default.mode">OVERWRITE</str>
</lst>



>> sku=REMOVE is required because sku is a stored field that is written to with copyField.
> I'm not sure I quite grok what REMOVE means yet, and how it fixes the copyField problem.
> 

I'm using 'REMOVE' to say "remove the previous value of this field before doing anything."
 Essentially, this makes sure you new document does not start with a value for 'sku'.


> Another way to work around copyField is to only collect stored fields that aren't copyField
targets.  

I just implemented this.  It is the most normal case, so it should be the default.  It can
be overridden by setting the mode for a copyField explicitly.




> 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, SOLR-139-IndexDocumentCommand.patch,
SOLR-139-XmlUpdater.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.


Mime
View raw message