# 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:** 2

<div class="post-metadata">

**Author:** ![matriv](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matriv/32/43656_2.png) [@matriv](https://discuss.elastic.co/u/matriv)\
**Post date:** [March 5, 2020, 5:28pm UTC](https://discuss.elastic.co/t/unable-to-run-sql-query-on-multi-fields-using-elastic-search-v-7-3/222321/2 "2020-03-05T17:28:26Z")

</div>

You are trying to use `KeywordField` which is of type `text`.  
The `LIKE` operator works only on fields of type `keyword`.  
If you still need the `KeywordField` analyzed with the `keyword-analyzer`  
you need to add an extra field `keyword` of `"type" : "keyword" and use that in your query:

```auto
SELECT * FROM \"t3-imp-2019\" where (productDescription.keyword like '%moringa%'

```

Of course this means that your `keyword` field will contain the whole String and won't be split up  
to words by any analyzer.

---

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