[jira] [Comment Edited] (SOLR-4127) Atomic updates used w/o updateLog should throw an error

2012-12-13 Thread Lukas Graf (JIRA)

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

Lukas Graf edited comment on SOLR-4127 at 12/13/12 8:51 PM:


Gave this a test with current trunk (r1421381) - works like a charm.
Thanks for fixing this so quickly Chris!

  was (Author: lukasgraf):
Gave this a test with current trunk (r1421381) - works like a charm.
Thanks for fixing this so quickly Hoss!
  
> Atomic updates used w/o updateLog should throw an error
> ---
>
> Key: SOLR-4127
> URL: https://issues.apache.org/jira/browse/SOLR-4127
> Project: Solr
>  Issue Type: Bug
>  Components: update
>Affects Versions: 4.0
>Reporter: Lukas Graf
>Assignee: Hoss Man
> Fix For: 4.1, 5.0
>
> Attachments: SOLR-4127.patch
>
>
> The atomic update feature described in 
> [SOLR-139|https://issues.apache.org/jira/browse/SOLR-139] seems to depend on 
> having an {{}} configured in {{solrconfig.xml}}.
> When used without an update log, the update commands like {{set}} or {{add}} 
> don't result in an error and the transaction being aborted, but produce 
> garbled documents instead. This is the case for both the XML and JSON formats 
> for the update message.
> Example:
> I initially created some content like this:
> {code}
> $ curl 'localhost:8983/solr/update?commit=true' -H 
> 'Content-type:application/json' -d '
> [{"id":"7cb8a43c","Title":"My original Title", "Creator": "John Doe"}]'
> {code}
> Which resulted in this document:
> {code:xml}
> 
> 7cb8a43c
> My original Title
> John Doe
> 
> {code}
> Then I attempted to update that document with this statement:
> {code}
> $ curl 'localhost:8983/solr/update?commit=true' -H 
> 'Content-type:application/json' -d '
> [{"id":"7cb8a43c","Title":{"set":"My new title"}}]'
> {code}
> Which resulted in this garbled document, with the fields that weren't updated 
> missing:
> {code:xml}
> 
> 7cb8a43c
> {set=My new title}
> 
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-4127) Atomic updates used w/o updateLog should throw an error

2012-12-13 Thread Lukas Graf (JIRA)

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

Lukas Graf commented on SOLR-4127:
--

Gave this a test with current trunk (r1421381) - works like a charm.
Thanks for fixing this so quickly Hoss!

> Atomic updates used w/o updateLog should throw an error
> ---
>
> Key: SOLR-4127
> URL: https://issues.apache.org/jira/browse/SOLR-4127
> Project: Solr
>  Issue Type: Bug
>  Components: update
>Affects Versions: 4.0
>Reporter: Lukas Graf
>Assignee: Hoss Man
> Fix For: 4.1, 5.0
>
> Attachments: SOLR-4127.patch
>
>
> The atomic update feature described in 
> [SOLR-139|https://issues.apache.org/jira/browse/SOLR-139] seems to depend on 
> having an {{}} configured in {{solrconfig.xml}}.
> When used without an update log, the update commands like {{set}} or {{add}} 
> don't result in an error and the transaction being aborted, but produce 
> garbled documents instead. This is the case for both the XML and JSON formats 
> for the update message.
> Example:
> I initially created some content like this:
> {code}
> $ curl 'localhost:8983/solr/update?commit=true' -H 
> 'Content-type:application/json' -d '
> [{"id":"7cb8a43c","Title":"My original Title", "Creator": "John Doe"}]'
> {code}
> Which resulted in this document:
> {code:xml}
> 
> 7cb8a43c
> My original Title
> John Doe
> 
> {code}
> Then I attempted to update that document with this statement:
> {code}
> $ curl 'localhost:8983/solr/update?commit=true' -H 
> 'Content-type:application/json' -d '
> [{"id":"7cb8a43c","Title":{"set":"My new title"}}]'
> {code}
> Which resulted in this garbled document, with the fields that weren't updated 
> missing:
> {code:xml}
> 
> 7cb8a43c
> {set=My new title}
> 
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-4127) Atomic updates used w/o updateLog should throw an error

2012-12-11 Thread Lukas Graf (JIRA)

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

Lukas Graf commented on SOLR-4127:
--

In my experience, the same symptoms could possibly be caused by either

* using the wrong syntax for the atomic update instructions
* or using the atomic "add" update instruction in an XML update message, which 
apparently isn't implemented (only in JSON).

If nobody beats me to it, I will add two separate issues for those.

> Atomic updates used w/o updateLog should throw an error
> ---
>
> Key: SOLR-4127
> URL: https://issues.apache.org/jira/browse/SOLR-4127
> Project: Solr
>  Issue Type: Bug
>  Components: update
>Affects Versions: 4.0
>Reporter: Lukas Graf
>Assignee: Hoss Man
> Fix For: 4.1
>
> Attachments: SOLR-4127.patch
>
>
> The atomic update feature described in 
> [SOLR-139|https://issues.apache.org/jira/browse/SOLR-139] seems to depend on 
> having an {{}} configured in {{solrconfig.xml}}.
> When used without an update log, the update commands like {{set}} or {{add}} 
> don't result in an error and the transaction being aborted, but produce 
> garbled documents instead. This is the case for both the XML and JSON formats 
> for the update message.
> Example:
> I initially created some content like this:
> {code}
> $ curl 'localhost:8983/solr/update?commit=true' -H 
> 'Content-type:application/json' -d '
> [{"id":"7cb8a43c","Title":"My original Title", "Creator": "John Doe"}]'
> {code}
> Which resulted in this document:
> {code:xml}
> 
> 7cb8a43c
> My original Title
> John Doe
> 
> {code}
> Then I attempted to update that document with this statement:
> {code}
> $ curl 'localhost:8983/solr/update?commit=true' -H 
> 'Content-type:application/json' -d '
> [{"id":"7cb8a43c","Title":{"set":"My new title"}}]'
> {code}
> Which resulted in this garbled document, with the fields that weren't updated 
> missing:
> {code:xml}
> 
> 7cb8a43c
> {set=My new title}
> 
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



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

2012-11-29 Thread Lukas Graf (JIRA)

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

Lukas Graf commented on SOLR-139:
-

Filed [SOLR-4127|https://issues.apache.org/jira/browse/SOLR-4127]: Atomic 
updates used w/o updateLog should throw an error

> Support updateable/modifiable documents
> ---
>
> Key: SOLR-139
> URL: https://issues.apache.org/jira/browse/SOLR-139
> Project: Solr
>  Issue Type: New Feature
>  Components: update
>Reporter: Ryan McKinley
> Fix For: 4.0
>
> Attachments: Eriks-ModifiableDocument.patch, 
> Eriks-ModifiableDocument.patch, Eriks-ModifiableDocument.patch, 
> Eriks-ModifiableDocument.patch, Eriks-ModifiableDocument.patch, 
> Eriks-ModifiableDocument.patch, getStoredFields.patch, getStoredFields.patch, 
> getStoredFields.patch, getStoredFields.patch, getStoredFields.patch, 
> SOLR-139_createIfNotExist.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.patch, SOLR-139.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.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Created] (SOLR-4127) Atomic updates used w/o updateLog should throw an error

2012-11-29 Thread Lukas Graf (JIRA)
Lukas Graf created SOLR-4127:


 Summary: Atomic updates used w/o updateLog should throw an error
 Key: SOLR-4127
 URL: https://issues.apache.org/jira/browse/SOLR-4127
 Project: Solr
  Issue Type: Bug
  Components: update
Affects Versions: 4.0
Reporter: Lukas Graf


The atomic update feature described in 
[SOLR-139|https://issues.apache.org/jira/browse/SOLR-139] seems to depend on 
having an {{}} configured in {{solrconfig.xml}}.

When used without an update log, the update commands like {{set}} or {{add}} 
don't result in an error and the transaction being aborted, but produce garbled 
documents instead. This is the case for both the XML and JSON formats for the 
update message.

Example:

I initially created some content like this:

{code}
$ curl 'localhost:8983/solr/update?commit=true' -H 
'Content-type:application/json' -d '
[{"id":"7cb8a43c","Title":"My original Title", "Creator": "John Doe"}]'
{code}

Which resulted in this document:

{code:xml}

7cb8a43c
My original Title
John Doe

{code}

Then I attempted to update that document with this statement:

{code}
$ curl 'localhost:8983/solr/update?commit=true' -H 
'Content-type:application/json' -d '
[{"id":"7cb8a43c","Title":{"set":"My new title"}}]'
{code}

Which resulted in this garbled document, with the fields that weren't updated 
missing:

{code:xml}

7cb8a43c
{set=My new title}

{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



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

2012-11-29 Thread Lukas Graf (JIRA)

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

Lukas Graf commented on SOLR-139:
-

Ok, I finally figured it out by diffing every single difference from my test 
case to the stock Solr 4.0 example using _git bisect_.

The culprit was a missing ** directive in _solrconfig.xml_. As 
soon as I configured a transaction log, atomic updates worked as expected. I 
added a note about this at 
http://wiki.apache.org/solr/UpdateXmlMessages#Optional_attributes_for_.22field.22
 .

> Support updateable/modifiable documents
> ---
>
> Key: SOLR-139
> URL: https://issues.apache.org/jira/browse/SOLR-139
> Project: Solr
>  Issue Type: New Feature
>  Components: update
>Reporter: Ryan McKinley
> Fix For: 4.0
>
> Attachments: Eriks-ModifiableDocument.patch, 
> Eriks-ModifiableDocument.patch, Eriks-ModifiableDocument.patch, 
> Eriks-ModifiableDocument.patch, Eriks-ModifiableDocument.patch, 
> Eriks-ModifiableDocument.patch, getStoredFields.patch, getStoredFields.patch, 
> getStoredFields.patch, getStoredFields.patch, getStoredFields.patch, 
> SOLR-139_createIfNotExist.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.patch, SOLR-139.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.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



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

2012-11-28 Thread Lukas Graf (JIRA)

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

Lukas Graf commented on SOLR-139:
-

Certainly, to the extent that I can.

> Support updateable/modifiable documents
> ---
>
> Key: SOLR-139
> URL: https://issues.apache.org/jira/browse/SOLR-139
> Project: Solr
>  Issue Type: New Feature
>  Components: update
>Reporter: Ryan McKinley
> Fix For: 4.0
>
> Attachments: Eriks-ModifiableDocument.patch, 
> Eriks-ModifiableDocument.patch, Eriks-ModifiableDocument.patch, 
> Eriks-ModifiableDocument.patch, Eriks-ModifiableDocument.patch, 
> Eriks-ModifiableDocument.patch, getStoredFields.patch, getStoredFields.patch, 
> getStoredFields.patch, getStoredFields.patch, getStoredFields.patch, 
> SOLR-139_createIfNotExist.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.patch, SOLR-139.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.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



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

2012-11-27 Thread Lukas Graf (JIRA)

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

Lukas Graf commented on SOLR-139:
-

Thanks for your response. I thought I had the issue reduced to a simple enough 
test case, but apparently not. I will try again with a clean stock Solr 4.0, 
and file a seperate issue if necessary, or look for support on the mailing 
list. My choice of words ('doesn't work as advertised') might have been 
influenced by frustration about the lack of documentation, sorry for the noise.

> Support updateable/modifiable documents
> ---
>
> Key: SOLR-139
> URL: https://issues.apache.org/jira/browse/SOLR-139
> Project: Solr
>  Issue Type: New Feature
>  Components: update
>Reporter: Ryan McKinley
> Fix For: 4.0
>
> Attachments: Eriks-ModifiableDocument.patch, 
> Eriks-ModifiableDocument.patch, Eriks-ModifiableDocument.patch, 
> Eriks-ModifiableDocument.patch, Eriks-ModifiableDocument.patch, 
> Eriks-ModifiableDocument.patch, getStoredFields.patch, getStoredFields.patch, 
> getStoredFields.patch, getStoredFields.patch, getStoredFields.patch, 
> SOLR-139_createIfNotExist.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.patch, SOLR-139.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.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Comment Edited] (SOLR-139) Support updateable/modifiable documents

2012-11-27 Thread Lukas Graf (JIRA)

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

Lukas Graf edited comment on SOLR-139 at 11/27/12 11:38 AM:


This feature doesn't work as advertised in Solr 4.0.0 (final).

Since it's not documented, I used the information in these blog posts 
([yonik.com|http://yonik.com/solr/atomic-updates/], 
[solr.pl|http://solr.pl/en/2012/07/09/solr-4-0-partial-documents-update/]) and 
this ticket to try to get it working, and asked in the #solr IRC channel, to no 
avail.

Whenever I use the 'set' command in an update message, it mangles the value to 
something like {code:xml}{set=My new title}{code} , and 
drops all other fields.

I tried the JSON as well as the XML Syntax for the update message, and I tried 
it with both a manually defined '_version_' field and without.

Relevant parts from my schema.xml:

{code:xml}



  
  
  
  
  




UID


{code}

I initially created some content like this:

{noformat}
$ curl 'localhost:8983/solr/update?commit=true' -H 
'Content-type:application/json' -d '[{"UID":"7cb8a43c","Title":"My original 
Title", "Creator": "John Doe"}]'
{noformat}

Which resulted in this document:

{code:xml}

7cb8a43c
My original Title
John Doe

{code}

Then I tried to update that document with this statement:

{noformat}
$ curl 'localhost:8983/solr/update?commit=true' -H 
'Content-type:application/json' -d '[{"UID":"7cb8a43c","Title":{"set":"My new 
title"}}]'
{noformat}

Which resulted in this mangled document:

{code:xml}

7cb8a43c
{set=My new title}

{code}

(I would have expected the document to still have the value 'John Doe' for the 
'Creator' field,
and have the value of its 'Title' field update to 'My new title')

I tried using the XML format for the update message as well:

{code:xml}

   
   7cb8a43c
   My new title
   

{code}

Same result as above.

  was (Author: lukasgraf):
This feature doesn't work as advertised in Solr 4.0.0 (final).

Since it's not documented, I used the information in these blog posts 
([yonik.com|http://yonik.com/solr/atomic-updates/], 
[solr.pl|http://solr.pl/en/2012/07/09/solr-4-0-partial-documents-update/]) and 
this ticket to try to get it working, and asked in the #solr IRC channel, to no 
avail.

Whenever I use the 'set' command in an update message, it mangles the value to 
something like {code:xml}{set=My new title}{code} , and 
drops all other fields.

I tried the JSON as well as the XML Syntax for the update message, and I tried 
it with both a manually defined '_version_' field and without.

Relevant parts from my schema.xml:

{code:xml}



  
  
  
  
  




UID


{code}

I initially created some content like this:

{noformat}
$ curl 'localhost:8983/solr/update?commit=true' -H 
'Content-type:application/json' -d '[{"UID":"7cb8a43c","Title":"My original 
Title", "Creator": "John Doe"}]'
{noformat}

Which resulted in this document:

{code:xml}

7cb8a43c
My original Title
John Doe

{code}

Then I tried to update that document with this statement:

{noformat}
$ curl 'localhost:8983/solr/update?commit=true' -H 
'Content-type:application/json' -d '[{"UID":"7cb8a43c","Title":{"set":"My new 
title"}}]'
{noformat}

Which resulted in this mangled document:

{code:xml}

7cb8a43c
{set=My new title}

{code}

(I would have expected the document to still have the value 'John Doe' for the 
'Creator' field,
and have the value of its 'Title' field update to 'My new title')

I tried using the XML format for the update message as well:

{code:xml}

   
   7cb8a43c
   My new title
   

{code}

Same result as above.
  
> Support updateable/modifiable documents
> ---
>
> Key: SOLR-139
> URL: https://issues.apache.org/jira/browse/SOLR-139
> Project: Solr
>  Issue Type: New Feature
>  Components: update
>Reporter: Ryan McKinley
> Fix For: 4.0
>
> Attachments: Eriks-ModifiableDocument.patch, 
> Eriks-ModifiableDocument.patch, Eriks-ModifiableDocument.patch, 
> Eriks-ModifiableDocument.patch, Eriks-ModifiableDocument.patch, 
> Eriks-ModifiableDocument.patch, getStoredFields.patch, getStoredFields.patch, 
> getStoredFields.patch, getStoredFields.patch, getStoredFields.patch, 
> SOLR-139_createIfNotExist.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-IndexDocumen

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

2012-11-27 Thread Lukas Graf (JIRA)

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

Lukas Graf commented on SOLR-139:
-

This feature doesn't work as advertised in Solr 4.0.0 (final).

Since it's not documented, I used the information in these blog posts 
([yonik.com|http://yonik.com/solr/atomic-updates/], 
[solr.pl|http://solr.pl/en/2012/07/09/solr-4-0-partial-documents-update/]) and 
this ticket to try to get it working, and asked in the #solr IRC channel, to no 
avail.

Whenever I use the 'set' command in an update message, it mangles the value to 
something like {code:xml}{set=My new title}{code} , and 
drops all other fields.

I tried the JSON as well as the XML Syntax for the update message, and I tried 
it with both a manually defined '_version_' field and without.

Relevant parts from my schema.xml:

{code:xml}



  
  
  
  
  




UID


{code}

I initially created some content like this:

{noformat}
$ curl 'localhost:8983/solr/update?commit=true' -H 
'Content-type:application/json' -d '[{"UID":"7cb8a43c","Title":"My original 
Title", "Creator": "John Doe"}]'
{noformat}

Which resulted in this document:

{code:xml}

7cb8a43c
My original Title
John Doe

{code}

Then I tried to update that document with this statement:

{noformat}
$ curl 'localhost:8983/solr/update?commit=true' -H 
'Content-type:application/json' -d '[{"UID":"7cb8a43c","Title":{"set":"My new 
title"}}]'
{noformat}

Which resulted in this mangled document:

{code:xml}

7cb8a43c
{set=My new title}

{code}

(I would have expected the document to still have the value 'John Doe' for the 
'Creator' field,
and have the value of its 'Title' field update to 'My new title')

I tried using the XML format for the update message as well:

{code:xml}

   
   7cb8a43c
   My new title
   

{code}

Same result as above.

> Support updateable/modifiable documents
> ---
>
> Key: SOLR-139
> URL: https://issues.apache.org/jira/browse/SOLR-139
> Project: Solr
>  Issue Type: New Feature
>  Components: update
>Reporter: Ryan McKinley
> Fix For: 4.0
>
> Attachments: Eriks-ModifiableDocument.patch, 
> Eriks-ModifiableDocument.patch, Eriks-ModifiableDocument.patch, 
> Eriks-ModifiableDocument.patch, Eriks-ModifiableDocument.patch, 
> Eriks-ModifiableDocument.patch, getStoredFields.patch, getStoredFields.patch, 
> getStoredFields.patch, getStoredFields.patch, getStoredFields.patch, 
> SOLR-139_createIfNotExist.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.patch, SOLR-139.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.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org