# Digit search not working for me

**URL:** <https://discuss.elastic.co/t/digit-search-not-working-for-me/119157>\
**Category:** Elasticsearch\
**Created:** [February 9, 2018, 4:41am UTC](https://discuss.elastic.co/t/digit-search-not-working-for-me/119157 "2018-02-09T04:41:02Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![aravind\_apalya](https://avatars.discourse-cdn.com/v4/letter/a/47e85d/32.png) [@aravind\_apalya](https://discuss.elastic.co/u/aravind_apalya)\
**Post date:** [February 9, 2018, 4:41am UTC](https://discuss.elastic.co/t/digit-search-not-working-for-me/119157/1 "2018-02-09T04:41:02Z")

</div>

Hi Team,

I am using elastic search version 0.90.5.  
When I am typing single word search started working but when i type digit its not searching.  
Overall for the titles which have numeric values search not showing results.  
Here is the search query which i've used

```
curl -XPOST 'http://IP:9200/content/_search'
    {"query" : {
        "function_score" : {
          "query" : {
            "filtered" : {
              "query" : {
                "bool" : {
                  "should" : {
                    "match" : {
                      "title" : {
                        "query" : "7",
                        "type" : "phrase_prefix",
                        "analyzer" : "keyword"
                      }
                    }
                  }
                }
              }
            }
          }
          
        }
      }
    }

```

Even for **simple** analyzer also it's not working.  
Can anyone please help me out

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 9, 2018, 6:21am UTC](https://discuss.elastic.co/t/digit-search-not-working-for-me/119157/2 "2018-02-09T06:21:31Z")

</div>

Could you provide a full recreation script as described in [About the Elasticsearch category](https://discuss.elastic.co/t/about-the-elasticsearch-category/21). It will help to better understand what you are doing. Please, try to keep the example as simple as possible.

---

<div class="post-metadata">

**Author:** ![aravind\_apalya](https://avatars.discourse-cdn.com/v4/letter/a/47e85d/32.png) [@aravind\_apalya](https://discuss.elastic.co/u/aravind_apalya)\
**Post date:** [February 9, 2018, 7:01am UTC](https://discuss.elastic.co/t/digit-search-not-working-for-me/119157/3 "2018-02-09T07:01:21Z")

</div>

My content is like:

```
**PUT index/content/1**
    {
      "title": "7 Aum arive"
    }

```

and I am querying

```
**POST 'http://IP:9200/content/_search'**
{"query" : {
    "function_score" : {
      "query" : {
        "filtered" : {
          "query" : {
            "bool" : {
              "should" : {
                "match" : {
                  "title" : {
                    "query" : "7",
                    "type" : "phrase_prefix",
                    "analyzer" : "keyword"
                  }
                }
              }
            }
          }
        }
      }
      
    }
  }
}
```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 9, 2018, 7:23am UTC](https://discuss.elastic.co/t/digit-search-not-working-for-me/119157/4 "2018-02-09T07:23:27Z")

</div>

I did that in 6.2.1:

```auto
DELETE test 
PUT test/doc/1
{
  "title": "7 Aum arive"
}
POST test/_search
{
  "query": {
    "match_phrase": {
      "title": {
        "query": "7"
      }
    }
  }
}

```

Gives:

```auto
{
  "took": 21,
  "timed_out": false,
  "_shards": {
    "total": 5,
    "successful": 5,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": 1,
    "max_score": 0.2876821,
    "hits": [
      {
        "_index": "test",
        "_type": "doc",
        "_id": "1",
        "_score": 0.2876821,
        "_source": {
          "title": "7 Aum arive"
        }
      }
    ]
  }
}

```

Really time to upgrade BTW. Even 1.7 is not supported anymore.

---

<div class="post-metadata">

**Author:** ![aravind\_apalya](https://avatars.discourse-cdn.com/v4/letter/a/47e85d/32.png) [@aravind\_apalya](https://discuss.elastic.co/u/aravind_apalya)\
**Post date:** [February 9, 2018, 7:28am UTC](https://discuss.elastic.co/t/digit-search-not-working-for-me/119157/5 "2018-02-09T07:28:28Z")

</div>

so upgrading is the only solution?  
As I am using v0.90.5, digit search doesn't work.  
Please correct me if I am wrong  
And also if I upgraded to v6.1 will that works with simple analyzer?

Thanks

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 9, 2018, 7:42am UTC](https://discuss.elastic.co/t/digit-search-not-working-for-me/119157/6 "2018-02-09T07:42:08Z")

</div>

I don't know but:

- I'm not going to install on my laptop a so old version to test it
- My example is much simpler than what you wrote so I'd do more practical examples

> will that works with simple analyzer?

Why do you choose to use the `simple` analyzer instead of the default one?

---

<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:** [March 9, 2018, 7:42am UTC](https://discuss.elastic.co/t/digit-search-not-working-for-me/119157/7 "2018-03-09T07:42:14Z")

</div>

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