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 wonder if that's a red herring, though. Here's my thought process,
and I would like someone with more internals knowledge to tell me if I
have this all wrong:
One of the canonical rules of parent/child documents is that child
documents must be in the same Lucene index segment as the parents.
When the two indexing requests are done without a commit in the middle,
this requirement is almost certain to be satisfied.
But if you commit between the two indexing requests, then the updated
document will be in a different Lucene segment than the document(s) it
is tied to. Maybe Solr 9 detects this problem and throws an exception,
where Solr 8 didn't, and it is being misreported as a docValues problem.
Or maybe the error isn't being misreported. If it is actually valid,
then you will have to either fix the mismatch on the price_c____l_ns
field and restart, or wipe the index and rebuild it from scratch.
But the statement about the updated document being in a different
segment is still valid. You might run into other problems with
documents for a parent/child relationship being in different segments.
Thanks,
Shawn