You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by slly <sl...@126.com> on 2022/06/11 15:58:59 UTC

After Solr 7.7 upgrade to Solr 8.11, there are two pieces of data in the same row, default overwrite is false?

Hello everyone. 
  We recently upgraded the online version from Solr 7 to 8.11, we found a very strange problem.


  Before upgrade, we wrote a row of data, the id is uniqueKey.
     id=1, name=alice, age=10
  After upgrade, we write three rows of data and id=2 is repeated.
     id=1, name=alice2, age=11
     id=2, name=nick, age=30
     id=2, name=nick2, age=31


We found NumFound=2 when querying with debugQuery=true&q=id:1, and NumFound=1 when querying with debugQuery=true&q=id:3


For historical data, the default 'overwrite' is false?




Thanks.





 





 





 





 





 

Re: After Solr 7.7 upgrade to Solr 8.11, there are two pieces of data in the same row, default overwrite is false?

Posted by dmitri maziuk <dm...@gmail.com>.
On 2022-06-11 10:58 AM, slly wrote:
> Hello everyone.
>    We recently upgraded the online version from Solr 7 to 8.11, we found a very strange problem.

Did you rebuild the index? I've seen it once on one of our development 
cores, dump and reimport of the offending dataset fixed it, and it 
hasn't happened since. (That's on 8.7.0)

Dima




Re:After Solr 7.7 upgrade to Solr 8.11, there are two pieces of data in the same row, default overwrite is false?

Posted by YangLiu <sl...@126.com>.

// update this sentence 
"We found NumFound=2 when querying with debugQuery=true&q=id:1, and NumFound=1 when querying with debugQuery=true&q=id:2"





At 2022-06-11 23:58:59, "slly" <sl...@126.com> wrote:
>Hello everyone. 
>  We recently upgraded the online version from Solr 7 to 8.11, we found a very strange problem.
>
>
>  Before upgrade, we wrote a row of data, the id is uniqueKey.
>     id=1, name=alice, age=10
>  After upgrade, we write three rows of data and id=2 is repeated.
>     id=1, name=alice2, age=11
>     id=2, name=nick, age=30
>     id=2, name=nick2, age=31
>
>
>We found NumFound=2 when querying with debugQuery=true&q=id:1, and NumFound=1 when querying with debugQuery=true&q=id:3
>
>
>For historical data, the default 'overwrite' is false?
>
>
>
>
>Thanks.
>
>
>
>
>
> 
>
>
>
>
>
> 
>
>
>
>
>
> 
>
>
>
>
>
> 
>
>
>
>
>
> 

Re: After Solr 7.7 upgrade to Solr 8.11, there are two pieces of data in the same row, default overwrite is false?

Posted by Rahul Goswami <ra...@gmail.com>.
I validated this using a 7.7.2 index (without the _root_ field defined) and
copying it to an 8.11.1 distribution data dir. Disabled _root_ field on
8.11.1 and tried updating an existing document. The document gets
overwritten as expected.

OP, are you using nested documents in 7.x? In that case you'd require the
_root_ field to be populated, otherwise not.

On Sat, Jun 11, 2022 at 10:19 PM Rahul Goswami <ra...@gmail.com>
wrote:

> This doesn't sound like the right behaviour. You should not need _root_
> field if you're not using nested documents. Can someone please confirm?
>
> On Sat, Jun 11, 2022 at 12:29 PM 戴晓彬 <xi...@foxmail.com> wrote:
>
>> There is no _root_ field in the index data before the upgrade. The 8.x
>> version will judge whether it is the same record according to _root_, so
>> the update will become two after the upgrade.
>> It is recommended to reindex after the upgrade.
>>
>> > 2022年6月12日 00:10,YangLiu <sl...@126.com> 写道:
>> >
>> >
>> >
>> >
>> > Thank you for your reply.
>> > The _root_ field is defined as follows:
>> >
>> >
>> >
>> >
>> >
>> <fieldname="_root_"type="StrField"docValues="false"indexed="true"stored="false"/>
>> >
>> <fieldTypename="StrField"class="solr.StrField"sortMissingLast="true"docValues="true"/>
>> >
>> >
>> >
>> >
>> >
>> > At 2022-06-12 00:05:00, "戴晓彬" <xi...@foxmail.com> wrote:
>> >> check the managed-schema to see if the _root_ field is defined.
>> >>
>> >>> 2022年6月11日 23:58,slly <sl...@126.com> 写道:
>> >>>
>> >>> Hello everyone.
>> >>> We recently upgraded the online version from Solr 7 to 8.11, we found
>> a very strange problem.
>> >>>
>> >>>
>> >>> Before upgrade, we wrote a row of data, the id is uniqueKey.
>> >>>    id=1, name=alice, age=10
>> >>> After upgrade, we write three rows of data and id=2 is repeated.
>> >>>    id=1, name=alice2, age=11
>> >>>    id=2, name=nick, age=30
>> >>>    id=2, name=nick2, age=31
>> >>>
>> >>>
>> >>> We found NumFound=2 when querying with debugQuery=true&q=id:1, and
>> NumFound=1 when querying with debugQuery=true&q=id:3
>> >>>
>> >>>
>> >>> For historical data, the default 'overwrite' is false?
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> Thanks.
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>>
>>

Re: After Solr 7.7 upgrade to Solr 8.11, there are two pieces of data in the same row, default overwrite is false?

Posted by Rahul Goswami <ra...@gmail.com>.
This doesn't sound like the right behaviour. You should not need _root_
field if you're not using nested documents. Can someone please confirm?

On Sat, Jun 11, 2022 at 12:29 PM 戴晓彬 <xi...@foxmail.com> wrote:

> There is no _root_ field in the index data before the upgrade. The 8.x
> version will judge whether it is the same record according to _root_, so
> the update will become two after the upgrade.
> It is recommended to reindex after the upgrade.
>
> > 2022年6月12日 00:10,YangLiu <sl...@126.com> 写道:
> >
> >
> >
> >
> > Thank you for your reply.
> > The _root_ field is defined as follows:
> >
> >
> >
> >
> >
> <fieldname="_root_"type="StrField"docValues="false"indexed="true"stored="false"/>
> >
> <fieldTypename="StrField"class="solr.StrField"sortMissingLast="true"docValues="true"/>
> >
> >
> >
> >
> >
> > At 2022-06-12 00:05:00, "戴晓彬" <xi...@foxmail.com> wrote:
> >> check the managed-schema to see if the _root_ field is defined.
> >>
> >>> 2022年6月11日 23:58,slly <sl...@126.com> 写道:
> >>>
> >>> Hello everyone.
> >>> We recently upgraded the online version from Solr 7 to 8.11, we found
> a very strange problem.
> >>>
> >>>
> >>> Before upgrade, we wrote a row of data, the id is uniqueKey.
> >>>    id=1, name=alice, age=10
> >>> After upgrade, we write three rows of data and id=2 is repeated.
> >>>    id=1, name=alice2, age=11
> >>>    id=2, name=nick, age=30
> >>>    id=2, name=nick2, age=31
> >>>
> >>>
> >>> We found NumFound=2 when querying with debugQuery=true&q=id:1, and
> NumFound=1 when querying with debugQuery=true&q=id:3
> >>>
> >>>
> >>> For historical data, the default 'overwrite' is false?
> >>>
> >>>
> >>>
> >>>
> >>> Thanks.
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
>
>

Re:Re: After Solr 7.7 upgrade to Solr 8.11, there are two pieces of data in the same row, default overwrite is false?

Posted by YangLiu <sl...@126.com>.
Thank you very much. The reason is what you said, we need to rebuild the index to recover(~very sad~)


The scenarios where the problem occurs are as follows:
 
 1. (7.7) the managed-schema of my configset contains _root_ field
 2. (7.7) create collection with my configset
 3.  (7.7) write doc
       id=1, name=alice, age=10
4. upgrade from 7.7 to 8.11
 5. (8.11) write doc
       id=1, name=alice2, age=11
6. (8.11) NumFound=2 when querying with debugQuery=true&q=id:1








At 2022-06-12 00:29:09, "戴晓彬" <xi...@foxmail.com> wrote:
>There is no _root_ field in the index data before the upgrade. The 8.x version will judge whether it is the same record according to _root_, so the update will become two after the upgrade.
>It is recommended to reindex after the upgrade.
>
>> 2022年6月12日 00:10,YangLiu <sl...@126.com> 写道:
>> 
>> 
>> 
>> 
>> Thank you for your reply. 
>> The _root_ field is defined as follows:
>> 
>> 
>> 
>> 
>> <fieldname="_root_"type="StrField"docValues="false"indexed="true"stored="false"/>
>> <fieldTypename="StrField"class="solr.StrField"sortMissingLast="true"docValues="true"/>
>> 
>> 
>> 
>> 
>> 
>> At 2022-06-12 00:05:00, "戴晓彬" <xi...@foxmail.com> wrote:
>>> check the managed-schema to see if the _root_ field is defined. 
>>> 
>>>> 2022年6月11日 23:58,slly <sl...@126.com> 写道:
>>>> 
>>>> Hello everyone. 
>>>> We recently upgraded the online version from Solr 7 to 8.11, we found a very strange problem.
>>>> 
>>>> 
>>>> Before upgrade, we wrote a row of data, the id is uniqueKey.
>>>>    id=1, name=alice, age=10
>>>> After upgrade, we write three rows of data and id=2 is repeated.
>>>>    id=1, name=alice2, age=11
>>>>    id=2, name=nick, age=30
>>>>    id=2, name=nick2, age=31
>>>> 
>>>> 
>>>> We found NumFound=2 when querying with debugQuery=true&q=id:1, and NumFound=1 when querying with debugQuery=true&q=id:3
>>>> 
>>>> 
>>>> For historical data, the default 'overwrite' is false?
>>>> 
>>>> 
>>>> 
>>>> 
>>>> Thanks.
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 

Re: After Solr 7.7 upgrade to Solr 8.11, there are two pieces of data in the same row, default overwrite is false?

Posted by 戴晓彬 <xi...@foxmail.com>.
There is no _root_ field in the index data before the upgrade. The 8.x version will judge whether it is the same record according to _root_, so the update will become two after the upgrade.
It is recommended to reindex after the upgrade.

> 2022年6月12日 00:10,YangLiu <sl...@126.com> 写道:
> 
> 
> 
> 
> Thank you for your reply. 
> The _root_ field is defined as follows:
> 
> 
> 
> 
> <fieldname="_root_"type="StrField"docValues="false"indexed="true"stored="false"/>
> <fieldTypename="StrField"class="solr.StrField"sortMissingLast="true"docValues="true"/>
> 
> 
> 
> 
> 
> At 2022-06-12 00:05:00, "戴晓彬" <xi...@foxmail.com> wrote:
>> check the managed-schema to see if the _root_ field is defined. 
>> 
>>> 2022年6月11日 23:58,slly <sl...@126.com> 写道:
>>> 
>>> Hello everyone. 
>>> We recently upgraded the online version from Solr 7 to 8.11, we found a very strange problem.
>>> 
>>> 
>>> Before upgrade, we wrote a row of data, the id is uniqueKey.
>>>    id=1, name=alice, age=10
>>> After upgrade, we write three rows of data and id=2 is repeated.
>>>    id=1, name=alice2, age=11
>>>    id=2, name=nick, age=30
>>>    id=2, name=nick2, age=31
>>> 
>>> 
>>> We found NumFound=2 when querying with debugQuery=true&q=id:1, and NumFound=1 when querying with debugQuery=true&q=id:3
>>> 
>>> 
>>> For historical data, the default 'overwrite' is false?
>>> 
>>> 
>>> 
>>> 
>>> Thanks.
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 


Re:Re: After Solr 7.7 upgrade to Solr 8.11, there are two pieces of data in the same row, default overwrite is false?

Posted by YangLiu <sl...@126.com>.


Thank you for your reply. 
The _root_ field is defined as follows:




<fieldname="_root_"type="StrField"docValues="false"indexed="true"stored="false"/>
<fieldTypename="StrField"class="solr.StrField"sortMissingLast="true"docValues="true"/>





At 2022-06-12 00:05:00, "戴晓彬" <xi...@foxmail.com> wrote:
>check the managed-schema to see if the _root_ field is defined. 
>
>> 2022年6月11日 23:58,slly <sl...@126.com> 写道:
>> 
>> Hello everyone. 
>>  We recently upgraded the online version from Solr 7 to 8.11, we found a very strange problem.
>> 
>> 
>>  Before upgrade, we wrote a row of data, the id is uniqueKey.
>>     id=1, name=alice, age=10
>>  After upgrade, we write three rows of data and id=2 is repeated.
>>     id=1, name=alice2, age=11
>>     id=2, name=nick, age=30
>>     id=2, name=nick2, age=31
>> 
>> 
>> We found NumFound=2 when querying with debugQuery=true&q=id:1, and NumFound=1 when querying with debugQuery=true&q=id:3
>> 
>> 
>> For historical data, the default 'overwrite' is false?
>> 
>> 
>> 
>> 
>> Thanks.
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 

Re: After Solr 7.7 upgrade to Solr 8.11, there are two pieces of data in the same row, default overwrite is false?

Posted by 戴晓彬 <xi...@foxmail.com>.
check the managed-schema to see if the _root_ field is defined. 

> 2022年6月11日 23:58,slly <sl...@126.com> 写道:
> 
> Hello everyone. 
>  We recently upgraded the online version from Solr 7 to 8.11, we found a very strange problem.
> 
> 
>  Before upgrade, we wrote a row of data, the id is uniqueKey.
>     id=1, name=alice, age=10
>  After upgrade, we write three rows of data and id=2 is repeated.
>     id=1, name=alice2, age=11
>     id=2, name=nick, age=30
>     id=2, name=nick2, age=31
> 
> 
> We found NumFound=2 when querying with debugQuery=true&q=id:1, and NumFound=1 when querying with debugQuery=true&q=id:3
> 
> 
> For historical data, the default 'overwrite' is false?
> 
> 
> 
> 
> Thanks.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 


Re: After Solr 7.7 upgrade to Solr 8.11, there are two pieces of data in the same row, default overwrite is false?

Posted by ca...@uca.es.
No es posible recibir su consulta por este medio. Para que nos llegue correctamente debe usar la aplicaci�n CAU: 

  http://cau.uca.es/


Agredeciendo su colaboraci�n.

        Saludos

----------------------------------------------------------------------------
Aplicaci�n CAU
http://cau.uca.es/