lucene-solr-dev mailing list archives

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


Ryan McKinley commented on SOLR-139:

I just attached a modified XmlUpdateRequestHandler that uses the new IndexDocumentCommand
.  I left this out originally because I think the discussion around syntax and functionality
should be separated...  BUT without some example, it is tough to get a sense how this would
work, so i added this example.

Check the new file:

It starts with:
<add mode="cat=DISTINCT,features=APPEND,price=INCREMENT,sku=REMOVE,OVERWRITE">
  <field name="id">3007WFP</field>

If you run  ./  monitor-modifier.xml multiple times and check: http://localhost:8983/solr/select?q=id:3007WFP
you should notice
1) the price increments by 5 each time
2) there is an additional 'feature' line each time
3) the categories are distinct even if the input is not

sku=REMOVE is required because sku is a stored field that is written to with copyField.  

Although I think this syntax is reasonable, this is just an example intended to spark discussion.
 Other things to consider:

* rather then 'field=mode,' we could do 'field:mode,' this may look less like HTTP request
parameter syntax

* The update handler could skip any stored field that is the target of a 'copyField' automatically.
 This is the most normal case, so it may be the most reasonable thing to do.

> Support updateable/modifiable documents
> ---------------------------------------
>                 Key: SOLR-139
>                 URL:
>             Project: Solr
>          Issue Type: Improvement
>          Components: update
>            Reporter: Ryan McKinley
>         Attachments: SOLR-139-IndexDocumentCommand.patch, 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:

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message