# Excheption in suggester responce

**URL:** <https://discuss.elastic.co/t/excheption-in-suggester-responce/19317>\
**Category:** Elasticsearch\
**Created:** [August 18, 2014, 10:01am UTC](https://discuss.elastic.co/t/excheption-in-suggester-responce/19317 "2014-08-18T10:01:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![makr](https://avatars.discourse-cdn.com/v4/letter/m/3ec8ea/32.png) [@makr](https://discuss.elastic.co/u/makr)\
**Post date:** [August 18, 2014, 10:01am UTC](https://discuss.elastic.co/t/excheption-in-suggester-responce/19317/1 "2014-08-18T10:01:49Z")

</div>

Hi!  
I try test elasticsearch suggester, but i got strange error.

user@user:/user/esconfig # curl -X POST  
'localhost:9200/dwh\_direct/\_suggest?pretty' -d @suggester  
{  
"\_shards" : {  
"total" : 5,  
"successful" : 0,  
"failed" : 5,  
"failures" : [ {  
"index" : "dwh\_direct",  
"shard" : 0,  
"reason" : "BroadcastShardOperationFailedException[[dwh\_direct][0] ];  
nested: ElasticsearchException[failed to execute suggest]; nested:  
ClassCastException[org.elasticsearch.index.mapper.core.StringFieldMapper  
cannot be cast to  
org.elasticsearch.index.mapper.core.CompletionFieldMapper]; "  
}, {  
"index" : "dwh\_direct",  
"shard" : 1,  
"reason" : "BroadcastShardOperationFailedException[[dwh\_direct][1] ];  
nested: ElasticsearchException[failed to execute suggest]; nested:  
ClassCastException[org.elasticsearch.index.mapper.core.StringFieldMapper  
cannot be cast to  
org.elasticsearch.index.mapper.core.CompletionFieldMapper]; "  
}, {  
"index" : "dwh\_direct",  
"shard" : 2,  
"reason" : "BroadcastShardOperationFailedException[[dwh\_direct][2] ];  
nested: ElasticsearchException[failed to execute suggest]; nested:  
ClassCastException[org.elasticsearch.index.mapper.core.StringFieldMapper  
cannot be cast to  
org.elasticsearch.index.mapper.core.CompletionFieldMapper]; "  
}, {  
"index" : "dwh\_direct",  
"shard" : 3,  
"reason" : "BroadcastShardOperationFailedException[[dwh\_direct][3] ];  
nested: ElasticsearchException[failed to execute suggest]; nested:  
ClassCastException[org.elasticsearch.index.mapper.core.StringFieldMapper  
cannot be cast to  
org.elasticsearch.index.mapper.core.CompletionFieldMapper]; "  
} ]  
}  
}

user@user:/user/esconfig # more suggester  
{  
"my-suggest" : {  
"text" : "co",  
"completion" : {  
"field" : "name"  
}  
}  
}

Is it bug in elasticsearch or i made mistake in configuration or query?

--

Maxim Krasovsky

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/465403c8-6f5a-4151-9c0f-e6e490fdfe13%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/465403c8-6f5a-4151-9c0f-e6e490fdfe13%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![vineeth\_mohan\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vineeth_mohan_2/32/747_2.png) [@vineeth\_mohan\_2](https://discuss.elastic.co/u/vineeth_mohan_2)\
**Post date:** [August 18, 2014, 1:30pm UTC](https://discuss.elastic.co/t/excheption-in-suggester-responce/19317/2 "2014-08-18T13:30:26Z")

</div>

Hello Maxim ,

Can you show the schema and a sample data that you have indexed.

Thanks  
Vineeth

On Mon, Aug 18, 2014 at 3:31 PM, [makr@ciklum.com](mailto:makr@ciklum.com) wrote:

> Hi!  
> I try test elasticsearch suggester, but i got strange error.
> 
> user@user:/user/esconfig # curl -X POST  
> 'localhost:9200/dwh\_direct/\_suggest?pretty' -d @suggester  
> {  
> "\_shards" : {  
> "total" : 5,  
> "successful" : 0,  
> "failed" : 5,  
> "failures" : [ {  
> "index" : "dwh\_direct",  
> "shard" : 0,  
> "reason" : "BroadcastShardOperationFailedException[[dwh\_direct][0]  
> ]; nested: ElasticsearchException[failed to execute suggest]; nested:  
> ClassCastException[org.elasticsearch.index.mapper.core.StringFieldMapper  
> cannot be cast to  
> org.elasticsearch.index.mapper.core.CompletionFieldMapper]; "  
> }, {  
> "index" : "dwh\_direct",  
> "shard" : 1,  
> "reason" : "BroadcastShardOperationFailedException[[dwh\_direct][1]  
> ]; nested: ElasticsearchException[failed to execute suggest]; nested:  
> ClassCastException[org.elasticsearch.index.mapper.core.StringFieldMapper  
> cannot be cast to  
> org.elasticsearch.index.mapper.core.CompletionFieldMapper]; "  
> }, {  
> "index" : "dwh\_direct",  
> "shard" : 2,  
> "reason" : "BroadcastShardOperationFailedException[[dwh\_direct][2]  
> ]; nested: ElasticsearchException[failed to execute suggest]; nested:  
> ClassCastException[org.elasticsearch.index.mapper.core.StringFieldMapper  
> cannot be cast to  
> org.elasticsearch.index.mapper.core.CompletionFieldMapper]; "  
> }, {  
> "index" : "dwh\_direct",  
> "shard" : 3,  
> "reason" : "BroadcastShardOperationFailedException[[dwh\_direct][3]  
> ]; nested: ElasticsearchException[failed to execute suggest]; nested:  
> ClassCastException[org.elasticsearch.index.mapper.core.StringFieldMapper  
> cannot be cast to  
> org.elasticsearch.index.mapper.core.CompletionFieldMapper]; "  
> } ]  
> }  
> }
> 
> user@user:/user/esconfig # more suggester  
> {  
> "my-suggest" : {  
> "text" : "co",  
> "completion" : {  
> "field" : "name"  
> }  
> }  
> }
> 
> Is it bug in elasticsearch or i made mistake in configuration or query?
> 
> --
> 
> Maxim Krasovsky
> 
> --  
> 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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/465403c8-6f5a-4151-9c0f-e6e490fdfe13%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/465403c8-6f5a-4151-9c0f-e6e490fdfe13%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/465403c8-6f5a-4151-9c0f-e6e490fdfe13%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/465403c8-6f5a-4151-9c0f-e6e490fdfe13%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAGdPd5%3DMQmX788p%3Db0G%2Bqk\_z6wwsA9HBtLu66fLRoKxvupRo%3Dw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGdPd5%3DMQmX788p%3Db0G%2Bqk_z6wwsA9HBtLu66fLRoKxvupRo%3Dw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:07am UTC](https://discuss.elastic.co/t/excheption-in-suggester-responce/19317/3 "2017-07-06T01:07:58Z")

</div>


