Failed to parse mapping [_doc]: Root mapping definition has unsupported parameters


(Atik Sarker) #1

Hi i am new in Elasticsearch,
I am getting the following error :

Invalid NEST response built from a unsuccessful low level call on PUT: /idxcomparatornt
# Audit trail of this API call:
 - [1] BadResponse: Node: http://localhost:9200/ Took: 00:00:00.5697725
# OriginalException: Elasticsearch.Net.ElasticsearchClientException: The remote server returned an error: (400) Bad Request.. Call: Status code 400 from: PUT /idxcomparatornt. ServerError: Type: mapper_parsing_exception Reason: "Failed to parse mapping [_doc]: Root mapping definition has unsupported parameters:  [Comparator : {properties={ProductFamily={type=text}, ManufacturerName={norms=true, analyzer=autocomplete, type=text, fields={keyword={normalizer=nrm_lowercase, ignore_above=255, type=keyword}}}, ProductType={type=text}, ComptEshoplink={type=text}, SearchString={norms=true, analyzer=autocomplete, type=text, fields={whitespace={norms=true, analyzer=whitespace, type=text}, plainstring={norms=true, analyzer=analyzerplanstring, type=text}, 1to50={norms=true, analyzer=autocomplete1to50, type=text}}}, Productline={type=text}, ItemNumber={norms=true, analyzer=autocomplete, type=text, fields={keyword={normalizer=nrm_lowercase, ignore_above=255, type=keyword}, whitespace={norms=true, analyzer=whitespace, type=text}, plainstring={norms=true, analyzer=analyzerplanstring, type=text}, 1to50={norms=true, analyzer=autocomplete1to50, type=text}}}, FullProductline={type=text}, ItemName={norms=true, analyzer=autocomplete, type=text, fields={keyword={normalizer=nrm_lowercase, ignore_above=255, type=keyword}, whitespace={norms=true, analyzer=whitespace, type=text}, plainstring={norms=true, analyzer=analyzerplanstring, type=text}, 1to50={norms=true, analyzer=autocomplete1to50, type=text}}}, PXC={type=nested, properties={PXCAssembledGroup={type=text}, PXCEquivalentType={type=text}, PXCComment={type=text}, CreatedBy={type=text}, PXCEquivalentID={type=text}, PhoenixEshoplink={type=text}, PXCImage={type=text}, PXCManufacturerName={analyzer=autocomplete, type=text}, PXCProductType={type=text}, PXCProductFamily={type=text}, CreatedDate={type=text}, PXCPreferredConversion={type=text}, PXCSuccessor={type=text}, PXCItemNumber={analyzer=autocomplete, type=text}, geoCountry={type=nested, properties={CountryName={type=text, fields={keyword={ignore_above=256, type=keyword}}}}}, PXCItemName={analyzer=autocomplete, type=text}}}, id={type=text, fields={keyword={ignore_above=256, type=keyword}}}, MarkingMaterialmsg={type=text}, ComptImage={type=text}, ComptComments={type=text}}}]" CausedBy: "Type: mapper_parsing_exception Reason: "Root mapping definition has unsupported parameters:  [Comparator : {properties={ProductFamily={type=text}, ManufacturerName={norms=true, analyzer=autocomplete, type=text, fields={keyword={normalizer=nrm_lowercase, ignore_above=255, type=keyword}}}, ProductType={type=text}, ComptEshoplink={type=text}, SearchString={norms=true, analyzer=autocomplete, type=text, fields={whitespace={norms=true, analyzer=whitespace, type=text}, plainstring={norms=true, analyzer=analyzerplanstring, type=text}, 1to50={norms=true, analyzer=autocomplete1to50, type=text}}}, Productline={type=text}, ItemNumber={norms=true, analyzer=autocomplete, type=text, fields={keyword={normalizer=nrm_lowercase, ignore_above=255, type=keyword}, whitespace={norms=true, analyzer=whitespace, type=text}, plainstring={norms=true, analyzer=analyzerplanstring, type=text}, 1to50={norms=true, analyzer=autocomplete1to50, type=text}}}, FullProductline={type=text}, ItemName={norms=true, analyzer=autocomplete, type=text, fields={keyword={normalizer=nrm_lowercase, ignore_above=255, type=keyword}, whitespace={norms=true, analyzer=whitespace, type=text}, plainstring={norms=true, analyzer=analyzerplanstring, type=text}, 1to50={norms=true, analyzer=autocomplete1to50, type=text}}}, PXC={type=nested, properties={PXCAssembledGroup={type=text}, PXCEquivalentType={type=text}, PXCComment={type=text}, CreatedBy={type=text}, PXCEquivalentID={type=text}, PhoenixEshoplink={type=text}, PXCImage={type=text}, PXCManufacturerName={analyzer=autocomplete, type=text}, PXCProductType={type=text}, PXCProductFamily={type=text}, CreatedDate={type=text}, PXCPreferredConversion={type=text}, PXCSuccessor={type=text}, PXCItemNumber={analyzer=autocomplete, type=text}, geoCountry={type=nested, properties={CountryName={type=text, fields={keyword={ignore_above=256, type=keyword}}}}}, PXCItemName={analyzer=autocomplete, type=text}}}, id={type=text, fields={keyword={ignore_above=256, type=keyword}}}, MarkingMaterialmsg={type=text}, ComptImage={type=text}, ComptComments={type=text}}}]"" ---> System.Net.WebException: The remote server returned an error: (400) Bad Request.
   at System.Net.HttpWebRequest.GetResponse()
   at Elasticsearch.Net.HttpWebRequestConnection.Request[TResponse](RequestData requestData)
   --- End of inner exception stack trace ---

I am not getting the problem.

Regards
Atiour


(Pavan Kumar Aryasomayajulu) #2

I hope you are making use of Elastic search 7.0 and Nest C# lastest version. There are some breaking changes with ES 7.0 which is causing this issue.

Please go through this link for fixing it


(Atik Sarker) #3

Yes i am using Elastic search 7.0 and Nest C# latest version.
Let me try your solution.


(Atik Sarker) #4

Thank you for you response, But i am not getting option for 7.1.0-ci20190412T075554.
Can you please share me the link of old version download.


(Pavan Kumar Aryasomayajulu) #5

Did you add the Package source as mentioned over there... If so what version are you getting


(Atik Sarker) #6

Yes i added but not getting option in to version.


(Pavan Kumar Aryasomayajulu) #7

Ok you also need to change package source option in package manager screen.. did you do that


(Atik Sarker) #8

Yes I also change that.


(Pavan Kumar Aryasomayajulu) #9

Can you share me that screenshot
and versions you are seeing... Also when defining package source just click on update


(Atik Sarker) #10


(Pavan Kumar Aryasomayajulu) #11


Please checkbox Include Pre-release


(Atik Sarker) #12

Thank you now i can update, but getting error:

OriginalException: Elasticsearch.Net.ElasticsearchClientException: Request failed to execute. Call: Status code 400 from: PUT /idxcomparatornt. ServerError: Type: mapper_parsing_exception Reason: "Failed to parse mapping [_doc]: Root mapping definition has unsupported parameters: [Comparator : {properties={ProductFamily={type=text}, ManufacturerName={norms=true, analyzer=autocomplete, type=text, fields={keyword={normalizer=nrm_lowercase, ignore_above=255, type=keyword}}}, ProductType={type=text}, ComptEshoplink={type=text}, SearchString={norms=true, analyzer=autocomplete, type=text, fields={whitespace={norms=true, analyzer=whitespace, type=text}, plainstring={norms=true, analyzer=analyzerplanstring, type=text}, 1to50={norms=true, analyzer=autocomplete1to50, type=text}}}, Productline={type=text}, ItemNumber={norms=true, analyzer=autocomplete, type=text, fields={keyword={normalizer=nrm_lowercase, ignore_above=255, type=keyword}, whitespace={norms=true, analyzer=whitespace, type=text}, plainstring={norms=true, analyzer=analyzerplanstring, type=text}, 1to50={norms=true, analyzer=autocomplete1to50, type=text}}}, FullProductline={type=text}, ItemName={norms=true, analyzer=autocomplete, type=text, fields={keyword={normalizer=nrm_lowercase, ignore_above=255, type=keyword}, whitespace={norms=true, analyzer=whitespace, type=text}, plainstring={norms=true, analyzer=analyzerplanstring, type=text}, 1to50={norms=true, analyzer=autocomplete1to50, type=text}}}, PXC={type=nested, properties={PXCAssembledGroup={type=text}, PXCEquivalentType={type=text}, PXCComment={type=text}, CreatedBy={type=text}, PXCEquivalentID={type=text}, PhoenixEshoplink={type=text}, PXCImage={type=text}, PXCManufacturerName={analyzer=autocomplete, type=text}, PXCProductType={type=text}, PXCProductFamily={type=text}, CreatedDate={type=text}, PXCPreferredConversion={type=text}, PXCSuccessor={type=text}, PXCItemNumber={analyzer=autocomplete, type=text}, geoCountry={type=nested, properties={CountryName={type=text, fields={keyword={ignore_above=256, type=keyword}}}}}, PXCItemName={analyzer=autocomplete, type=text}}}, id={type=text, fields={keyword={ignore_above=256, type=keyword}}}, MarkingMaterialmsg={type=text}, ComptImage={type=text}, ComptComments={type=text}}}]" CausedBy: "Type: mapper_parsing_exception Reason: "Root mapping definition has unsupported parameters: [Comparator : {properties={ProductFamily={type=text}, ManufacturerName={norms=true, analyzer=autocomplete, type=text, fields={keyword={normalizer=nrm_lowercase, ignore_above=255, type=keyword}}}, ProductType={type=text}, ComptEshoplink={type=text}, SearchString={norms=true, analyzer=autocomplete, type=text, fields={whitespace={norms=true, analyzer=whitespace, type=text}, plainstring={norms=true, analyzer=analyzerplanstring, type=text}, 1to50={norms=true, analyzer=autocomplete1to50, type=text}}}, Productline={type=text}, ItemNumber={norms=true, analyzer=autocomplete, type=text, fields={keyword={normalizer=nrm_lowercase, ignore_above=255, type=keyword}, whitespace={norms=true, analyzer=whitespace, type=text}, plainstring={norms=true, analyzer=analyzerplanstring, type=text}, 1to50={norms=true, analyzer=autocomplete1to50, type=text}}}, FullProductline={type=text}, ItemName={norms=true, analyzer=autocomplete, type=text, fields={keyword={normalizer=nrm_lowercase, ignore_above=255, type=keyword}, whitespace={norms=true, analyzer=whitespace, type=text}, plainstring={norms=true, analyzer=analyzerplanstring, type=text}, 1to50={norms=true, analyzer=autocomplete1to50, type=text}}}, PXC={type=nested, properties={PXCAssembledGroup={type=text}, PXCEquivalentType={type=text}, PXCComment={type=text}, CreatedBy={type=text}, PXCEquivalentID={type=text}, PhoenixEshoplink={type=text}, PXCImage={type=text}, PXCManufacturerName={analyzer=autocomplete, type=text}, PXCProductType={type=text}, PXCProductFamily={type=text}, CreatedDate={type=text}, PXCPreferredConversion={type=text}, PXCSuccessor={type=text}, PXCItemNumber={analyzer=autocomplete, type=text}, geoCountry={type=nested, properties={CountryName={type=text, fields={keyword={ignore_above=256, type=keyword}}}}}, PXCItemName={analyzer=autocomplete, type=text}}}, id={type=text, fields={keyword={ignore_above=256, type=keyword}}}, MarkingMaterialmsg={type=text}, ComptImage={type=text}, ComptComments={type=text}}}]""


(Pavan Kumar Aryasomayajulu) #13

Could you please paste here the entire class and other inherited classes for which you are trying to create mapping


(Koen Wellekens) #14

I'm getting the same problem. It seems that NEST translates the provided class definition into a mappings array which is incompatible with ES7 when trying to create a new index.