# Insensitive searching

**URL:** <https://discuss.elastic.co/t/insensitive-searching/126616>\
**Category:** Elasticsearch\
**Created:** [April 3, 2018, 5:20pm UTC](https://discuss.elastic.co/t/insensitive-searching/126616 "2018-04-03T17:20:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![olenderhub](https://avatars.discourse-cdn.com/v4/letter/o/e9bcb4/32.png) [@olenderhub](https://discuss.elastic.co/u/olenderhub)\
**Post date:** [April 3, 2018, 5:20pm UTC](https://discuss.elastic.co/t/insensitive-searching/126616/1 "2018-04-03T17:20:26Z")

</div>

Good morning, I am struggling with insensitive searching (elasticsearch version 2.4.6).

Currently, I am using Ruby on Rails and using wrapper for Elasticsearch.

My configuration is:

(record has a string for example: "this is Computer!")  
when a query is "is Comp" or "is comp" it should find the record with "this is Computer!" string

```auto
  query: {
    filtered: {
      query: {
        regexp: {
          '_all': ".*#{query}.*"
        }
      }
    }
  }

```

also I have settings:

"analyzer": "custom\_keyword" with:

```auto
{
  "filter": ["lowercase"],
  "type": "keyword"
}

```

and it works with:

```auto
"_all": {
  "analyzer": "custom_keyword"
}

```

What is wrong with that? Thanks for suggestions

Updated:

Found something like [https://github.com/elastic/elasticsearch/issues/18064#issuecomment-259449484](https://github.com/elastic/elasticsearch/issues/18064#issuecomment-259449484)  
Testing it.

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [April 6, 2018, 2:30pm UTC](https://discuss.elastic.co/t/insensitive-searching/126616/2 "2018-04-06T14:30:15Z")

</div>

Please check the section on [custom analyzer](https://www.elastic.co/guide/en/elasticsearch/guide/2.x/custom-analyzers.html) for Elasticsearch Guide. It explain pretty well the concept of the analysis and gives good examples on how to use it.

I suspect that you wanted to do something like this:

```auto
{
  "filter": ["lowercase"],
  "type": "custom",
  "tokenizer": "standard"
}

```

---

<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:** [May 4, 2018, 2:30pm UTC](https://discuss.elastic.co/t/insensitive-searching/126616/3 "2018-05-04T14:30:19Z")

</div>

Closed on May 4, 2018, 2:30pm UTC

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