On Thu, Dec 10, 2015 at 12:38 PM, Bogdan Marinescu <
bogdan.marine...@awinta.com> wrote:

> I'm interested in the workaround.


If you add the childless document first and afterwards the child, then
> sol'r should append the child to the already existing document (or rather
> delete the existing one as the new one has newer data).
>
I'd suggest to add empty child doc into every empty parent.

I've faced this problem where I was just deleting the parent by id and I
> had lots of orphan documents just laying around.
>
deleteByQuery should be amended <uniqKey>:999 should be turned to
_root_:999, the you need to do instead of deleteById.
If you have deleteByQuery(Brand:Nike) (matching parents), it needs to be
turned to deleteByQuery(Brand:Nike {!child of=parent:true}Brand:Nike)

-- 
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics

<http://www.griddynamics.com>
<mkhlud...@griddynamics.com>

Reply via email to