You are using three features together
A) Nested docs
B) Price field (which is really storing price and currency in two sub fields)
C) Atomic updates

I would not be surprised if these three are not really compatible.
Since there is a requiement to ALWAYS index the entire block of parent and 
children for every update to nested docs, I think you violate that requirement 
by attempting an atomic update. Solr would take the PARENT document, read it 
from disk, construct a new version of it with the added value, and then storing 
it in a different segment. But the children would be gone.

So your safest bet is to treat the entire block as a unit, avoid atomic and 
re-send the entire block every time you need an update to even the smallest 
part of the parent/child structure.

Jan

> 27. okt. 2022 kl. 23:51 skrev Thomas Corthals <tho...@klascement.net>:
> 
> Op do 27 okt. 2022 om 22:04 schreef Shawn Heisey <apa...@elyograg.org 
> <mailto:apa...@elyograg.org>>:
> 
>> On 10/19/22 16:41, Thomas Corthals wrote:
>>> I'm running into an exception with Solr 9.0.0 for a request that works
>> fine
>>> with Solr 8.11.2 and I have no idea why.
>> <snip>
>>> However, if I don't do a commit between the two adds, I don't get the
>> error.
>>> 
>>> 
>>> Did something change between Solr 8 and 9 that I have to account for in
>> my
>>> schema or my update requests? Or is this a bug?
>> 
>> The error seems to indicate that there is a conflict between the
>> existing index and the schema with respect to docValues on the field
>> named price_c____l_ns.  Usually when this happens you have to completely
>> delete the data directory, reload the index or restart Solr, and reindex
>> from scratch.
>> 
> 
> I can reproduce it on a pristine techproducts example index by unpacking
> the Solr 9.0.0 download and changing the schema in the sample configset
> *before* I even start that Solr instance for the very first time. That
> should rule out a conflict between the existing index and the schema as the
> index was built from scratch with that schema and I didn't change it
> afterwards.
> 
> The error only occurs with _nest_path_ in the schema, changing _root_ to
> stored="true" alone doesn't cause it.
> 
> The error still only occurs with a commit between the initial "add" of the
> doc and the atomic update. The error doesn't occur if I commit after both
> "add"'s.
> 
> Thomas

Reply via email to