# Why I can't get hits by mentioning string or Number directly in kibana search bar?

**URL:** <https://discuss.elastic.co/t/why-i-cant-get-hits-by-mentioning-string-or-number-directly-in-kibana-search-bar/42227>\
**Category:** Kibana\
**Created:** [February 19, 2016, 10:20am UTC](https://discuss.elastic.co/t/why-i-cant-get-hits-by-mentioning-string-or-number-directly-in-kibana-search-bar/42227 "2016-02-19T10:20:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikas\_gopal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_gopal/32/47661_2.png) [@vikas\_gopal](https://discuss.elastic.co/u/vikas_gopal)\
**Post date:** [February 19, 2016, 10:20am UTC](https://discuss.elastic.co/t/why-i-cant-get-hits-by-mentioning-string-or-number-directly-in-kibana-search-bar/42227/1 "2016-02-19T10:20:21Z")

</div>

Hi Experts,

I have a situation , I am searching 2341 in discover tab . So rather mentioning baseId :2341 , I am directly mentioning 2341. So idea is to get this number/base ID anywhere in the logs.Unfortunately I got nothing , but with baseId :2341 I got 2 hits.

I checked my mapping for this field , it is string , not analyzed , now why string because it will have **OR** separated values like  
baseId: 2341 OR 2344 OR 7861...etc

 ![](https://us1.discourse-cdn.com/elastic/original/2X/5/5cc2838a00a1e6fda5f628e107aa3d8c7bc7930d.png)

As per my understanding whatever we mention in Kibana search bar it should search for that string/number and try to match that value in the logs rt? but in my case it is not working

Please help me to understand what i am missing , I am using ES 1.7.1 with 4.1.1 kiaban on Ubuntu

Thanks  
Vikas

---

<div class="post-metadata">

**Author:** ![vikas\_gopal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_gopal/32/47661_2.png) [@vikas\_gopal](https://discuss.elastic.co/u/vikas_gopal)\
**Post date:** [February 19, 2016, 10:24am UTC](https://discuss.elastic.co/t/why-i-cant-get-hits-by-mentioning-string-or-number-directly-in-kibana-search-bar/42227/2 "2016-02-19T10:24:06Z")

</div>

BTW I am using a template which will set all the string fields to **not\_analyzed**. So I am using

```
{
  "template" : "*",
  "settings" : {
  "index.refresh_interval" : "5s"
},
"mappings" : {
  "_default_" : {
   "_all" : {"enabled" : true},
   "dynamic_templates" : [ {
     "string_fields" : {
       "match" : "*",
       "match_mapping_type" : "string",
       "mapping" : {
         "type" : "string", "index" : "not_analyzed"

       }
     }
   } ],
   "properties" : {
     "@version": { "type": "string", "index": "not_analyzed" },
     "geoip" : {
       "type" : "object",
         "dynamic": true,
         "path": "full",
         "properties" : {
           "location" : { "type" : "geo_point" }
     }
    }
   }
  }
 }
}
```

---

<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, 2:01pm UTC](https://discuss.elastic.co/t/why-i-cant-get-hits-by-mentioning-string-or-number-directly-in-kibana-search-bar/42227/3 "2017-07-06T14:01:43Z")

</div>


