11
M 06 83 33 57 95
Efrank@reddata.nl<mailto:frank@reddata.nl>
Van: Alexandre Rafalovitch
Datum: donderdag, 17 september 2020 om 21:07
Aan: solr-user
Onderwerp: Re: NPE Issue with atomic update to nested document or child
document through SolrJ
The missing underscor
atomic update to nested document or child
document through SolrJ
The missing underscore is a documentation bug, because it was not
escaped the second time and the asciidoc chewed it up as an
bold/italic indicator. The declaration and references should match.
I am not sure about the code. I hope so
The missing underscore is a documentation bug, because it was not
escaped the second time and the asciidoc chewed it up as an
bold/italic indicator. The declaration and references should match.
I am not sure about the code. I hope somebody else will step in on that part.
Regards,
Alex.
On Thu
I am running this in a unit test which deletes the collection after the
test is over. So every new test run gets a fresh collection.
It is a very simple test where I am first indexing a couple of parent
documents with few children and then testing an atomic update on one parent
as I have posted in
Did you reindex the original document after you added a new field? If
not, then the previously indexed content is missing it and your code
paths will get out of sync.
Regards,
Alex.
P.s. I haven't done what you are doing before, so there may be
something I am missing myself.
On Thu, 17 Sep 20
Thanks for your reply Alexandre.
I have "_root_" and "_nest_path_" fields in my schema but not
"_nest_parent_".
I ran my test after adding the "_nest_parent_" field and I am not getting
NPE any more which is good. Thanks!
But looking at the documents in the index, I see that after the ato
Can you double-check your schema to see if you have all the fields
required to support nested documents. You are supposed to get away
with just _root_, but really you should also include _nest_path and
_nest_parent_. Your particular exception seems to be triggering
something (maybe a bug) related t
Following are the approaches I have tried so far and both results in NPE.
*approach 1
TestChildPOJO testChildPOJO = new TestChildPOJO().cId( "c1_child1" )
.conceptid( "c1" )
Looking at some other unit tests in repo, I tried an approach using
UpdateRequest as follows.
SolrInputDocument sdoc = new SolrInputDocument( );
> sdoc.addField( "id", testChildPOJO.id() );
> sdoc.setField( "fieldName",
> java.util.Collections.singletonMap("set