# Unable to run SQL query on multi fields using Elastic Search v. 7.3

**URL:** <https://discuss.elastic.co/t/unable-to-run-sql-query-on-multi-fields-using-elastic-search-v-7-3/222321>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-sql\
**Created:** [March 5, 2020, 2:45pm UTC](https://discuss.elastic.co/t/unable-to-run-sql-query-on-multi-fields-using-elastic-search-v-7-3/222321 "2020-03-05T14:45:58Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Prince.Tyagi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prince.tyagi/32/63898_2.png) [@Prince.Tyagi](https://discuss.elastic.co/u/Prince.Tyagi)\
**Post date:** [March 5, 2020, 2:45pm UTC](https://discuss.elastic.co/t/unable-to-run-sql-query-on-multi-fields-using-elastic-search-v-7-3/222321/1 "2020-03-05T14:45:58Z")

</div>

Hi Team,

I am getting below error while executing elasticsearch SQL query for translating it to elastic query on multifield:

> ```
> {
> * "error": {
> * "root_cause": [
> * {
> * "type": "verification_exception",
> * "reason": "Found 1 problem(s) line 1:36: [productDescription.KeywordField like '%moringa%'] cannot operate on field of data type [text]: No keyword/multi-field defined exact matches for [KeywordField]; define one or use MATCH/QUERY instead"}],
> * "type": "verification_exception",
> * "reason": "Found 1 problem(s) line 1:36: [productDescription.KeywordField like '%moringa%'] cannot operate on field of data type [text]: No keyword/multi-field defined exact matches for [KeywordField]; define one or use MATCH/QUERY instead"},
> * "status": 400
> }
> 
> ```

I am using Elasticsearch 7.3.0.

Below is the query which I am using for sql translate api -

> ```
> http://localhost:9200/_sql/translate
> {
> "query": "SELECT * FROM \"t3-imp-2019\" where (productDescription.KeywordField like '%moringa%')"
> }
> 
> ```

Below is my index mapping and settings:

> ```
> {
> "settings": {
> "index": {
> "analysis": {
> "normalizer": {
> "lowercase_normalizer": {
> "filter": [
> "lowercase"
> ],
> "type": "custom",
> "char_filter": []
> }
> },
> "analyzer": {
> "keyword-analyser": {
> "filter": [
> "lowercase"
> ],
> "type": "custom",
> "tokenizer": "keyword"
> }
> }
> }
> }
> },
> "mappings": {
> "_doc": {
> "properties": {
> "productDescription": {
> "analyzer": "english",
> "type": "text",
> "fields": {
> "KeywordField": {
> "analyzer": "keyword-analyser",
> "type": "text"
> }
> }
> }
> }
> }
> }
> }
> 
> ```

According to error if I am trying to convert productDescription field type to "keyword", then it is giving below error:

> ```
> {
> * "error": {
> * "root_cause": [
> * {
> * "type": "mapper_parsing_exception",
> * "reason": "no handler for type [Keyword] declared on field [KeywordField]"}],
> * "type": "mapper_parsing_exception",
> * "reason": "Failed to parse mapping [_doc]: no handler for type [Keyword] declared on field [KeywordField]",
> * "caused_by": {
> * "type": "mapper_parsing_exception",
> * "reason": "no handler for type [Keyword] declared on field [KeywordField]"}},
> * "status": 400
> }
> 
> ```

---

_[View the full topic](https://discuss.elastic.co/t/unable-to-run-sql-query-on-multi-fields-using-elastic-search-v-7-3/222321)._
