I have a index with records on type1, And I'm trying to add a new type type2 which has a type1 parent type.
i'm receiving the error can't add a _parent field that points to an already existing type but I don't understand this.
Hi, @Miguel_Michelsongs
It was merged, and just confirmed with @mvg that from 2.x, you can't add child types to a non-parent type on the fly, you need to make sure the type you are using is already a "parent" type, because after 2.0, the _parent field stores as special doc values field used for joining, if your parent type doesn't have this value, there maybe some potential issue, like missmatch or incorrect docs.
Hi @medcl.net, thanks for your reply.
just two more questions,
how can I know that the type is a parent type ?
if the type is not a parent type , then how can I update this in order to transform the type to a parent type without loosing indexed records ? is possible to use alias strategy for this ?
ps: I'd get this working indexing the type2 first, and then create type1, after that i've to reindex records on type1
Hi, @Miguel_Michelsongs
Sorry for the late reply, you can't change the type, you must create the type2 and type during the index creation, and set the type as parent, after that, you may use create type1 anytime to use type as parent type.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.