Re: NPE Issue with atomic update to nested document or child document through SolrJ

2020-09-18 Thread Frank Vos
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

Re: NPE Issue with atomic update to nested document or child document through SolrJ

2020-09-18 Thread Frank Vos
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

Re: NPE Issue with atomic update to nested document or child document through SolrJ

2020-09-17 Thread Alexandre Rafalovitch
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

Re: NPE Issue with atomic update to nested document or child document through SolrJ

2020-09-17 Thread Pratik Patel
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

Re: NPE Issue with atomic update to nested document or child document through SolrJ

2020-09-17 Thread Alexandre Rafalovitch
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

Re: NPE Issue with atomic update to nested document or child document through SolrJ

2020-09-17 Thread Pratik Patel
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

Re: NPE Issue with atomic update to nested document or child document through SolrJ

2020-09-17 Thread Alexandre Rafalovitch
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

Re: NPE Issue with atomic update to nested document or child document through SolrJ

2020-09-17 Thread pratik@semandex
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" )

Re: NPE Issue with atomic update to nested document or child document through SolrJ

2020-09-16 Thread Pratik Patel
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

NPE Issue with atomic update to nested document or child document through SolrJ

2020-09-16 Thread Pratik Patel
Hello Everyone, I am trying to update a field of a child document using atomic updates feature. I am using solr and solrJ version 8.5.0 I have ensured that my schema satisfies the conditions for atomic updates and I am able to do atomic updates on normal documents but with nested child documents,