Hi, here are the relevant fields from the schema.

<fieldType name="long" class="solr.LongPointField" docValues="true"/>
<field name="_version_" type="long" indexed="false" stored="false" docValues
="true" multiValued="false" />
<field name="views_count" type="long" stored="false" indexed="false"
docValues="true" multiValued="false"/>

There are no copyfields for views_count.

Here are the corresponding atomic indexing and commit requests:

curl http://solr:8983/solr/answers/update -d '[{"id" :
"answers:question:8029","views_count" : {"set":111}}]'
curl "http://solr:8983/solr/answers/update?commit=true";

It DOES change the value successfully. To verify if it is doing atomic
indexing or in-place update, I changed the name of one other field
from
<field name="asset_type" type="string" stored="true" indexed="true"
multiValued="true" default="1775"/>
to
<field name="asset_typ" type="string" stored="true" indexed="true"
multiValued="true" default="1775"/>
and reloaded the schema.

Now, when I send above mentioned atomic indexing request, I get following
error message:

{
  "responseHeader":{
    "status":400,
    "QTime":7},
  "error":{
    "metadata":[
      "error-class","org.apache.solr.common.SolrException",
      "root-error-class","org.apache.solr.common.SolrException"],
    "msg":"ERROR: [doc=answers:question:8029] unknown field 'asset_type'",
    "code":400}}

So, I believe that it is still trying to index other fields as well from
their stored values and it is not an in-place update. What am I missing?

On Fri, Apr 1, 2022 at 9:50 PM Shawn Heisey <apa...@elyograg.org> wrote:

> On 3/31/22 13:36, gnandre wrote:
> > Here is what I tried to confirm if it is still doing atomic indexing and
> > not in-place indexing. I changed one other unrelated field's name and
> > reloaded the schema.
> > Now, when I performed the indexing just for the field that I wanted to
> > update in-place, it should not have complained about this other unrelated
> > field as it wouldn't bother indexing it.
> > But it did complain with 'unknown field' for the unrelated field. So that
> > tells me it is still doing atomic indexing and trying to index the whole
> > document with all fields.
> >
> > Is my understanding correct? If so, then why are in-place updates still
> not
> > working?
>
> Can you share your schema, the atomic update request you are sending,
> and an idea of what the contents of all the fields in the existing
> document are?
>
> Thanks,
> Shawn
>
>

Reply via email to