Hi Kral,
I think that the mapping is fine. Here it is:
"mappings":{
"account":{
"properties":{
"name":{
"type":"string",
"index":"not_analyzed"
}
... ANOTHER ACCOUNT FIELDS ...
},
"_routing":{
"required":true,
"path":"name"
}
},
"event":{
"properties":{
... SOME EVENT FIELDS ...
"account":{
"type":"object",
"properties":{
... SOME MORE FIELDS ...
"name":{
"type":"string",
"index":"no"
}
}
}
},
"_parent":{
"type":"account"
},
"_timestamp":{
"enabled":true,
"store":true
},
"_routing":{
"required":true,
"path":"account.name"
}
}
}
Do you see anything wrong here?
Thx
On Sunday, October 12, 2014 9:46:37 PM UTC+3, Honza Král wrote:
>
> Hi Costya,
>
> the code actually looks for parent and should move it around. Are you
> sure you have your mappings set up correctly for the new index to
> include the parent/child relationship?
>
> Thanks
>
> On Sun, Oct 12, 2014 at 5:30 PM, Costya Regev <[email protected]
> <javascript:>> wrote:
> > Hi,
> >
> > When we run the following code:
> >
> > from elasticsearch import Elasticsearch
> > from elasticsearch.helpers import reindex
> >
> >
> > if __name__ == "__main__":
> > es = Elasticsearch()
> > reindex(es, source_index='2014_03', target_index='2014_03_new',
> > chunk_size=500, scroll='5m')
> >
> > We get the 2014_03_new index with all the fields but the _parent field
> > inserted right. However, the _parent field, which we have in most of the
> > documents of the original index is consistently missing in all of the
> > documents of the new index.
> >
> > It looks like a bug in the client's code.
> >
> > We will appreciate your help.
> >
> > Regards,
> > Costya, Totango Metrics.
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups
> > "elasticsearch" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an
> > email to [email protected] <javascript:>.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/elasticsearch/b52dc918-4529-40ab-97e0-2a3b0176ec59%40googlegroups.com.
>
>
> > For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/62eb9ecc-b88b-439e-bea7-b31141f1deb1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.