You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2014/10/16 22:46:33 UTC

[jira] [Resolved] (SOLR-6628) Atomic updates delete content field

     [ https://issues.apache.org/jira/browse/SOLR-6628?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man resolved SOLR-6628.
----------------------------
    Resolution: Cannot Reproduce

Can't reproduce using the example 4.10 configs (see steps below).

If you are having difficulties getting solr to work the way you expect, please send an email to solr-user@lucene before filing a bug report (you are more likely to get more assistance from more people more quickly on that mailing list.)

My best guess is that you have modified the example schema.xml in a way that is not compatible with using Atomic updates -- pehaps you changed the "content" field to stored="false" ? ...

https://cwiki.apache.org/confluence/display/solr/Updating+Parts+of+Documents#UpdatingPartsofDocuments-AtomicUpdates

bq. All original source fields must be stored for field modifiers to work correctly, which is the Solr default.


{noformat}
hossman@frisbee:~$ curl -Ss 'http://localhost:8983/solr/collection1/update' -H 'Content-type:application/json' -d '[{
  "id": "some_id",
  "content_type": [
    "text/html; charset=utf-8"
  ],
  "title": [
    "some title"
  ],
  "content": [
    "some content"
  ]}]'
{"responseHeader":{"status":0,"QTime":25}}
hossman@frisbee:~$ curl -Ss 'http://localhost:8983/solr/collection1/update' -H 'Content-type:application/json' -d '[{"id":"some_id","1986_i":{"set":2}}]'
{"responseHeader":{"status":0,"QTime":8}}
hossman@frisbee:~$ curl -Ss 'http://localhost:8983/solr/collection1/get?id=some_id&wt=json&indent=true' 
{
  "doc":
  {
    "id":"some_id",
    "content_type":["text/html; charset=utf-8"],
    "title":["some title"],
    "content":["some content"],
    "1986_i":2,
    "_version_":1482153923374481408}}

{noformat}

> Atomic updates delete content field
> -----------------------------------
>
>                 Key: SOLR-6628
>                 URL: https://issues.apache.org/jira/browse/SOLR-6628
>             Project: Solr
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 4.10
>         Environment: Localhost under Jetty version 9.2.1.v20140609
>            Reporter: Bernardo Botella
>
> Let's say we have an indexed document provided by Tika contrib package:
> {code:xml}
> {
>   "id": "some_id",
>   "content_type": [
>     "text/html; charset=utf-8"
>   ],
>   "language": "en",
>   "title": [
>     "some title"
>   ],
>   "content": [
>     "some content"
>   ],
>   "_version_": some_version
> }
> {code}
> Now, I want to add a field with an atomic update using curl from terminal
> {code}
> curl -s 'http://solr_ip:8080/solr/update' -H 'Content-type:application/json' -d '[{"id":"some_id","1986_i":{"set":2}}]'
> {code}
> The result document is:
> {code:xml}
> {
>   "id": "some_id",
>   "content_type": [
>     "text/html; charset=utf-8"
>   ],
>   "language": "en",
>   "title": [
>     "some title"
>   ],
>   "1986_i": 2,
>   "_version_": other_version
> }
> {code}
> The content field is missing.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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