# Search query for multivalue field in Kibana Search Box

**URL:** <https://discuss.elastic.co/t/search-query-for-multivalue-field-in-kibana-search-box/138464>\
**Category:** Kibana\
**Created:** [July 4, 2018, 1:24am UTC](https://discuss.elastic.co/t/search-query-for-multivalue-field-in-kibana-search-box/138464 "2018-07-04T01:24:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sharon.c](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sharon.c/32/16076_2.png) [@sharon.c](https://discuss.elastic.co/u/sharon.c)\
**Post date:** [July 4, 2018, 1:24am UTC](https://discuss.elastic.co/t/search-query-for-multivalue-field-in-kibana-search-box/138464/1 "2018-07-04T01:24:14Z")

</div>

I am using Elasticsearch 5.1 and Kibana 5.1

I need to search multivalue field in Kibana.  
For example I have an index with a multivalued field named "tags".  
I have 2 documents in the index  
{ "tags" : ["search"] }  
{ "tags" : ["search", "open\_source"] }

Case 1  
If I use http get, attaching the following query,  
{ "term" : { "tags" : "search" } }  
then I can get both of the 2 documents  
{ "tags" : ["search"] }  
{ "tags" : ["search", "open\_source"] }

Case 2  
But if I use Kibana interface, and put in the search box a query as follows:  
tags: "search"  
Then I can only get one document  
{ "tags" : ["search"] }  
Looks like it only returns the document which has exactly the same match.

But what I need is: if one value match in the multivalue field, it should count as match. I know how to do it using http request with attached document (Case 1), but I don't know how to do it in Kibana Search box (Case 2) . Can any body help me?

---

<div class="post-metadata">

**Author:** ![spalger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spalger/32/14092_2.png) [@spalger](https://discuss.elastic.co/u/spalger)\
**Post date:** [July 4, 2018, 1:42am UTC](https://discuss.elastic.co/t/search-query-for-multivalue-field-in-kibana-search-box/138464/2 "2018-07-04T01:42:42Z")

</div>

> [@sharon.c](#):
>
> tags: "search"

Are you putting a space in the query box like you typed here? If so it's probably not matching what you think. Try searching without the space, like `tags:"search"` not `tags: "search"`

---

<div class="post-metadata">

**Author:** ![sharon.c](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sharon.c/32/16076_2.png) [@sharon.c](https://discuss.elastic.co/u/sharon.c)\
**Post date:** [July 4, 2018, 2:03pm UTC](https://discuss.elastic.co/t/search-query-for-multivalue-field-in-kibana-search-box/138464/3 "2018-07-04T14:03:31Z")

</div>

I tried both tags:"search" and tags: "search"  
The result is the same.

Please help me to identify if there is any option for me to search into multivalued fields using Kibana search box.

Thank you!

---

<div class="post-metadata">

**Author:** ![spalger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spalger/32/14092_2.png) [@spalger](https://discuss.elastic.co/u/spalger)\
**Post date:** [July 4, 2018, 6:14pm UTC](https://discuss.elastic.co/t/search-query-for-multivalue-field-in-kibana-search-box/138464/4 "2018-07-04T18:14:07Z")

</div>

@Bargs do you have any ideas here?

---

<div class="post-metadata">

**Author:** ![sharon.c](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sharon.c/32/16076_2.png) [@sharon.c](https://discuss.elastic.co/u/sharon.c)\
**Post date:** [July 5, 2018, 2:16am UTC](https://discuss.elastic.co/t/search-query-for-multivalue-field-in-kibana-search-box/138464/5 "2018-07-05T02:16:03Z")

</div>

I found out the reason that in the field value there is a space before search, just like this " search"  
That's why I cannot find the match.

---

<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:** [August 2, 2018, 2:16am UTC](https://discuss.elastic.co/t/search-query-for-multivalue-field-in-kibana-search-box/138464/6 "2018-08-02T02:16:03Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
