Problem with faceting

hi team,
i have problem with faceting.

My Mapping:-

{"included":{"_routing":{"required":true},"properties":{"_included":
{"store":"yes","analyzer":"standard","type":"string"},"parentrelationid":
{"omit_term_freq_and_positions":false,"index":"analyzed","omit_norms":false,"store":"yes","type":"long"},"_updatedby":
{"omit_term_freq_and_positions":false,"omit_norms":false,"store":"yes","type":"long"},"_updatedon":
{"omit_term_freq_and_positions":false,"omit_norms":false,"store":"yes","format":"MMM/
dd/yyyy HH:mm:ss","type":"date"}},"_parent":{"type":"metadata"}}}

When quering data i got:

{"took":0,"timed_out":false,"_shards":{"total":5,"successful":
5,"failed":0},"hits":{"total":100,"max_score":1.0,"hits":
[{"_index":"db265","_type":"included","_id":"-
l123u7GRMafitbhPWtddw","_score":1.0,"fields":
{"_included":"STATUS2STATUS","_updatedby":
1,"parentrelationid":"0010000001","_updatedon":"May/03/2011
17:38:48"}},
{"_index":"db265","_type":"included","_id":"BkJLM4S9T_awIRi0i7bzEg","_score":
1.0,"fields":{"_included":"STATUS2STATUS","_updatedby":
1,"parentrelationid":"0010000006","_updatedon":"May/03/2011
17:38:48"}},
{"_index":"db265","_type":"included","_id":"LCL31bqrRGWaAn2ryRNCFQ","_score":
1.0,"fields":{"_included":"STATUS2STATUS","_updatedby":
1,"parentrelationid":"0010000013","_updatedon":"May/03/2011
17:38:48"}},
{"_index":"db265","_type":"included","_id":"DgrPrCE4SvKgJNaHUgTHsw","_score":
1.0,"fields":{"_included":"STATUS2STATUS","_updatedby":
1,"parentrelationid":"0010000018","_updatedon":"May/03/2011
17:38:48"}},
{"_index":"db265","_type":"included","_id":"2mnfzbk6RMy6F45EsTP6Rw","_score":
1.0,"fields":{"_included":"STATUS2STATUS","_updatedby":
1,"parentrelationid":"0010000020","_updatedon":"May/03/2011
17:38:48"}}]}}

but when i faceting field parentrelationid

{"took":0,"timed_out":false,"_shards":{"total":5,"successful":
5,"failed":0},"hits":{"total":100,"max_score":1.0,"hits":[]},"facets":
{"tagparentrelationid":{"_type":"terms","missing":0,"terms":[{"term":"
\b","count":100},{"term":"X\u0001\u0000","count":100},{"term":"T
\u0010\u0000","count":100},{"term":"P\u0002\u0000\u0000","count":100},
{"term":"L \u0000\u0000","count":100},{"term":"H
\u0004\u0000\u0000\u0000","count":100},{"term":"D@
\u0000\u0000\u0000","count":100},{"term":"@\b
\u0000\u0000\u0000\u0000","count":100},{"term":"<
\u0001\u0000\u0000\u0000\u0000\u0000","count":100},
{"term":"8\u0010\u0000\u0000\u0000\u0000\u0000","count":100},
{"term":"4\u0002\u0000\u0000\u0000\u0000\u0000\t","count":100},
{"term":"0 \u0000\u0000\u0000\u0000\u0001\u0018","count":100},
{"term":",\u0004\u0000\u0000\u0000\u0000\u0000\u0013\t","count":100},
{"term":"(@\u0000\u0000\u0000\u0000\u00021\u0016"]}}}

Please help....

Can you post a gist recreation? (Elasticsearch Platform — Find real-time answers at scale | Elastic). Seems like somewhere the field is treated as long, and then as string.
On Thursday, May 5, 2011 at 10:02 AM, senthil prabhu wrote:

hi team,
i have problem with faceting.

My Mapping:-

{"included":{"_routing":{"required":true},"properties":{"_included":
{"store":"yes","analyzer":"standard","type":"string"},"parentrelationid":
{"omit_term_freq_and_positions":false,"index":"analyzed","omit_norms":false,"store":"yes","type":"long"},"_updatedby":
{"omit_term_freq_and_positions":false,"omit_norms":false,"store":"yes","type":"long"},"_updatedon":
{"omit_term_freq_and_positions":false,"omit_norms":false,"store":"yes","format":"MMM/
dd/yyyy HH:mm:ss","type":"date"}},"_parent":{"type":"metadata"}}}

When quering data i got:

{"took":0,"timed_out":false,"_shards":{"total":5,"successful":
5,"failed":0},"hits":{"total":100,"max_score":1.0,"hits":
[{"_index":"db265","_type":"included","_id":"-
l123u7GRMafitbhPWtddw","_score":1.0,"fields":
{"_included":"STATUS2STATUS","_updatedby":
1,"parentrelationid":"0010000001","_updatedon":"May/03/2011
17:38:48"}},
{"_index":"db265","_type":"included","_id":"BkJLM4S9T_awIRi0i7bzEg","_score":
1.0,"fields":{"_included":"STATUS2STATUS","_updatedby":
1,"parentrelationid":"0010000006","_updatedon":"May/03/2011
17:38:48"}},
{"_index":"db265","_type":"included","_id":"LCL31bqrRGWaAn2ryRNCFQ","_score":
1.0,"fields":{"_included":"STATUS2STATUS","_updatedby":
1,"parentrelationid":"0010000013","_updatedon":"May/03/2011
17:38:48"}},
{"_index":"db265","_type":"included","_id":"DgrPrCE4SvKgJNaHUgTHsw","_score":
1.0,"fields":{"_included":"STATUS2STATUS","_updatedby":
1,"parentrelationid":"0010000018","_updatedon":"May/03/2011
17:38:48"}},
{"_index":"db265","_type":"included","_id":"2mnfzbk6RMy6F45EsTP6Rw","_score":
1.0,"fields":{"_included":"STATUS2STATUS","_updatedby":
1,"parentrelationid":"0010000020","_updatedon":"May/03/2011
17:38:48"}}]}}

but when i faceting field parentrelationid

{"took":0,"timed_out":false,"_shards":{"total":5,"successful":
5,"failed":0},"hits":{"total":100,"max_score":1.0,"hits":},"facets":
{"tagparentrelationid":{"_type":"terms","missing":0,"terms":[{"term":"
\b","count":100},{"term":"X\u0001\u0000","count":100},{"term":"T
\u0010\u0000","count":100},{"term":"P\u0002\u0000\u0000","count":100},
{"term":"L \u0000\u0000","count":100},{"term":"H
\u0004\u0000\u0000\u0000","count":100},{"term":"D@
\u0000\u0000\u0000","count":100},{"term":"@\b
\u0000\u0000\u0000\u0000","count":100},{"term":"<
\u0001\u0000\u0000\u0000\u0000\u0000","count":100},
{"term":"8\u0010\u0000\u0000\u0000\u0000\u0000","count":100},
{"term":"4\u0002\u0000\u0000\u0000\u0000\u0000\t","count":100},
{"term":"0 \u0000\u0000\u0000\u0000\u0001\u0018","count":100},
{"term":",\u0004\u0000\u0000\u0000\u0000\u0000\u0013\t","count":100},
{"term":"(@\u0000\u0000\u0000\u0000\u00021\u0016"]}}}

Please help....