Unable To Add Custom Analyzer

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,

{

* "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.


  "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"
        }
      },

Could you provide a full recreation script as described in About the Elasticsearch category. 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.

{
  "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.

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

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