# Apply analyzer on Object fields

**URL:** <https://discuss.elastic.co/t/apply-analyzer-on-object-fields/101961>\
**Category:** Elasticsearch\
**Created:** [September 27, 2017, 9:35am UTC](https://discuss.elastic.co/t/apply-analyzer-on-object-fields/101961 "2017-09-27T09:35:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lea](https://avatars.discourse-cdn.com/v4/letter/l/bc8723/32.png) [@lea](https://discuss.elastic.co/u/lea)\
**Post date:** [September 27, 2017, 9:35am UTC](https://discuss.elastic.co/t/apply-analyzer-on-object-fields/101961/1 "2017-09-27T09:35:40Z")

</div>

Hello!

I have this analyzer:

```
{
  "index": {
    "number_of_shards": 1,
    "analysis": {
      "filter": {
        "word_joiner": {
          "type": "word_delimiter",
          "catenate_all": true,
          "preserve_original": true
        }
      },
      "analyzer": {
        "word_join_analyzer": {
          "type": "custom",
          "filter": [
            "word_joiner"
          ],
          "tokenizer": "keyword"
        }
      }
    }
  }
}

```

I apply it on this field:

```
@Field(type = FieldType.Object, analyzer = "word_join_analyzer")
private Description description;

```

And here is the Description class:

```
public class Description {

       @JsonProperty("localizedDescriptions")
       private Map<String, String> descriptions = new HashMap<>();
}

```

This is the resulting Elasticsearch mapping for this field:

```
{  
   "description":{  
      "properties":{  
         "localizedDescriptions":{  
            "properties":{  
               "en":{  
                  "type":"string"
               },
               "fr":{  
                  "type":"string"
               },
               "it":{  
                  "type":"string"
               }
            }
         }
      }
   }
}

```

Like you can see, the anlyzer is not applied at all. It works well with string fields, but I have a hard time doing it with Object types. Any ideas?  
Thanks!

---

<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:** [October 25, 2017, 9:35am UTC](https://discuss.elastic.co/t/apply-analyzer-on-object-fields/101961/2 "2017-10-25T09:35:40Z")

</div>

Closed on October 25, 2017, 9:35am UTC

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