# Unable To Add Custom Analyzer

**URL:** <https://discuss.elastic.co/t/unable-to-add-custom-analyzer/230816>\
**Category:** Elasticsearch\
**Created:** [May 2, 2020, 4:33pm UTC](https://discuss.elastic.co/t/unable-to-add-custom-analyzer/230816 "2020-05-02T16:33:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prakash\_Choudhary](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prakash_choudhary/32/52194_2.png) [@Prakash\_Choudhary](https://discuss.elastic.co/u/Prakash_Choudhary)\
**Post date:** [May 2, 2020, 4:33pm UTC](https://discuss.elastic.co/t/unable-to-add-custom-analyzer/230816/1 "2020-05-02T16:33:58Z")

</div>

Hi ,

I am trying to create a new index in open source elastic search cluster and unable to create customer analyser facing the issue. I required help please help me in this to resolve issue,

```auto
{

* "error": { 
  * "root_cause": [ 
    * { 
      * "type": "illegal_argument_exception",
      * "reason": "unknown setting [index.mappings.properties.__v.type] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"}],
  * "type": "illegal_argument_exception",
  * "reason": "unknown setting [index.mappings.properties.__v.type] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"

```

This type of error i am getting in all field after i added this analyser.

```auto

  "settings": {
"max_inner_result_window": "50000",
    "max_result_window": "50000",
    "analysis": {
      "filter": {
        "english_stop": {
          "type": "stop",
          "stopwords": "_english"
        },
        "english_stemmer": {
          "type": "stemmer",
          "language": "english"
        },
        "english_possessive_stemmer": {
          "type": "stemmer",
          "language": "possessive_english"
        }
      },

```

---

<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:** [May 2, 2020, 7:30pm UTC](https://discuss.elastic.co/t/unable-to-add-custom-analyzer/230816/2 "2020-05-02T19:30:29Z")

</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.

A full reproduction script will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.

---

<div class="post-metadata">

**Author:** ![Prakash\_Choudhary](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prakash_choudhary/32/52194_2.png) [@Prakash\_Choudhary](https://discuss.elastic.co/u/Prakash_Choudhary)\
**Post date:** [May 4, 2020, 7:40am UTC](https://discuss.elastic.co/t/unable-to-add-custom-analyzer/230816/3 "2020-05-04T07:40:28Z")

</div>

```auto
{
  "settings": {
    "analysis": {
      "filter": {
        "english_stop": {
          "type": "stop",
          "stopwords": "_english"
        },
        "english_stemmer": {
          "type": "stemmer",
          "language": "english"
        },
        "english_possessive_stemmer": {
          "type": "stemmer",
          "language": "possessive_english"
        }
      },
      "analyzer": {
        "rebuilt_english": {
          "type": "custom",
          "tokenizer": "standard",
          "filter": [
            "english_possessive_stemmer",
            "lowercase",
            "english_stop",
            "english_stemmer"
          ]
        }
      }
    }
  },
  "mappings": {
    "properties": {
      "__v": {
        "type": "long"
      },
      "availability": {
        "type": "long"
      },
      "bio": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "education": {
        "properties": {
          "_id": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },
         
            
       
          "degreeType": {
            "properties": {
              "_id": {
                "type": "text",
                "fields": {
                  "keyword": {
                    "type": "keyword",
                    "ignore_above": 256
                  }
                }
              },
              "degreeTypeIndex": {
                "type": "long"
              },
              "name": {
                "type": "text",
                "fields": {
                  "keyword": {
                    "type": "keyword",
                    "ignore_above": 256
                  }
                }
              }
            }
          },
          "educationOrder": {
            "type": "long"
          },
          "fieldOfStudy": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },
          "field_of_stydy": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },
          "instituteName": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },
          "percentage": {
            "type": "long"
          },
          "timePeriod": {
            "properties": {
              "end": {
                "properties": {
                  "month": {
                    "type": "long"
                  },
                  "year": {
                    "type": "long"
                  }
                }
              },
              "isPersuing": {
                "type": "boolean"
              },
              "start": {
                "properties": {
                  "month": {
                    "type": "long"
                  },
                  "year": {
                    "type": "long"
                  }
                }
              }
            }
          },
          "time_period": {
            "properties": {
              "end": {
                "properties": {
                  "month": {
                    "type": "long"
                  },
                  "year": {
                    "type": "long"
                  }
                }
              },
              "is_persuing": {
                "type": "boolean"
              },
              "start": {
                "properties": {
                  "month": {
                    "type": "long"
                  },
                  "year": {
                    "type": "long"
                  }
                }
              }
            }
          },
          "yearOfPassing": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          }
        }
      },
      "employmentType": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "experience": {
        "properties": {
          "_id": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },
          "company": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },
          "designation": {
            "type": "text",
            "analyzer": "rebuilt_english",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },
          "from": {
            "properties": {
              "month": {
                "type": "long"
              },
              "year": {
                "type": "long"
              }
            }
          },
          "isWorking": {
            "type": "boolean"
          },
          "responsibilities": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },
          "upto": {
            "properties": {
              "month": {
                "type": "long"
              },
              "year": {
                "type": "long"
              }
            }
          }
        }
      },
      "headline": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "interestPreference": {
        "type": "object"
      },
      "isFresher": {
        "type": "boolean"
      },
      "licensesCertifications": {
        "properties": {
          "_id": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },
          "issuedDate": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },
          "issuedDateISO": {
            "type": "date"
          },
          "name": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },
          "organization": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },
          "type": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          }
        }
      },
      "noticePeriod": {
        "type": "long"
      },
      "oplog_date": {
        "type": "date",
        "format": "yyyy/MM/dd HH:mm:ss||yyyy/MM/dd||epoch_millis"
      },
      "oplog_ts": {
        "properties": {
          "I": {
            "type": "long"
          },
          "T": {
            "type": "long"
          }
        }
      },
      "portfolioLinks": {
        "properties": {
          "_id": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },
          "link": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },
          "title": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          }
        }
      },
      "preferedindustry": {
        "type": "object"
      },
      "profileCoverVideo": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "resumeRequestedCount": {
        "type": "long"
      },
      "resumeSettings": {
        "properties": {
          "isAskMeEveryTime": {
            "type": "boolean"
          },
          "isPublic": {
            "type": "boolean"
          },
          "isShareWithJobApplication": {
            "type": "boolean"
          }
        }
      },
      "resumeString": {
        "type": "text",
        "analyzer": "rebuilt_english",
        "fields": {
          "type": "text",
          "analyzer": "rebuilt_english"
        }
      },
      "resumeUrl": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "salary": {
        "properties": {
          "current": {
            "type": "long"
          },
          "expected": {
            "type": "long"
          }
        }
      },
      "totalExperience": {
        "properties": {
          "month": {
            "type": "long"
          },
          "year": {
            "type": "long"
          }
        }
      },
      "user": {
      
          "address": {
            "properties": {
              "coordinates": {
                "type": "geo_point"
              },
              "countryCode": {
                "type": "text",
                "fields": {
                  "keyword": {
                    "type": "keyword",
                    "ignore_above": 256
                  }
                }
              },
              "gridCoordinates": {
                "type": "geo_point"
              },
              "gridLatitude": {
                "type": "float"
              },
              "gridLongitude": {
                "type": "float"
              },
              "latitude": {
                "type": "float"
              },
              "longitude": {
                "type": "float"
              }           
          },
          "age": {
            "type": "long"
          },
          "countryDetail": {
            "properties": {
              "_id": {
                "type": "text",
                "fields": {
                  "keyword": {
                    "type": "keyword",
                    "ignore_above": 256
                  }
                }
              },
              "country": {
                "type": "text",
                "fields": {
                  "keyword": {
                    "type": "keyword",
                    "ignore_above": 256
                  }
                }
              },
          "email": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },
          "fullName": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },
          "gender": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },
          "isDeactivated": {
            "type": "boolean"
          }       
        }
      }
    }
  }
}
}}

```

this is full script and want to create one index with the analyzer but now getting this error.

```auto
"reason": "illegal field [analyzer], only fields can be specified inside fields"

```

---

<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:** [June 1, 2020, 7:40am UTC](https://discuss.elastic.co/t/unable-to-add-custom-analyzer/230816/4 "2020-06-01T07:40:30Z")

</div>

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