Parent/Child Types and removable of types


(Poul K Sørensen) #1

Hi

I am a new user to ES and just read https://www.elastic.co/blog/index-type-parent-child-join-now-future-in-elasticsearch. One of the first things I been setting up is a index in NEST and c# that has multiple types (but they are similar).

When I read it, i get the impression that types are being removed and I could not fully understand what this means for parent/child.

I already more or less designed my types for this index such the type information i not needed, the entities has their own property Type which can be used in queries and deserialization to distinct them from eachother.

With coming changes, should I still in mappings tell it .Parent ? like I have done here
https://stackoverflow.com/questions/45577460/how-to-create-index-of-polymorphic-data-in-elastic-search-with-nest or is it enough to just set the parent when indexing like i done here

 public IIndexRequest Selector(IndexDescriptor<ResourceEntity> resourceDescription)
        {
           resourceDescription.Id(NormalizedId).Routing(Routing);

           if (HasParent)
                resourceDescription.Parent(NormalizedParentId);          

            return resourceDescription;
        }

Should child's still be on the same shard as their parent?
In my Parent Poco´s, should they have a property for the children or does it not matter since I can just query for the children? public List<Child> Children {get;set;}

I know there are multiple questions in here, but being a first timer this is everything that I am not sure about after a few days of playing around and would much appreciate if anyone can answer partly or fully on everything.


(Shane Connelly) #2

For parent/child, this functionality is moving into a special join type that we're planning to introduce in 5.6. Under the covers, it's basically the same idea as parent/child, but supports a typeless future. You can read about it here, including the caveats. Note: we haven't yet released 5.6.

I will say that if you create an index in 5.x, it'll continue to work as-is in 6.x (though it's possible that certain features we develop over 6.x may not be available to these). It's only any new indices that you create on or after upgrading to 6.x that will need the join type.


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.