I am trying to copy the whole index data from a remote server to my local elasticsearch.
As per page, to use _reindex, we have to first copy the mapping and setting of source index
on running curl -XGET x.x.x.x:9200/modified_taxonomy/ and the result gave me the mapping and setting of the index
{ "mappings": {"keywords": {"properties": {"Commodities": {"properties": {"Code": {"type": "text", "fields": {"keyword": {"type": "keyword", "ignore_above": 256 } } }, "Title": {"type": "text", "fields": {"keyword": {"type": "keyword", "ignore_above": 256 } } }, "code": {"type": "long"}, "title": {"type": "text", "fields": {"keyword": {"type": "keyword", "ignore_above": 256 } } } } }, "Keyword": {"type": "text", "fields": {"analyzed": {"type": "text", "analyzer": "analyzer_keyword", "search_analyzer": "analyzer_shingle"}, "keyword": {"type": "keyword", "ignore_above": 256 } }, "analyzer": "analyzer_keyword", "search_analyzer": "analyzer_shingle"}, "KeywordType": {"type": "text", "fields": {"keyword": {"type": "keyword", "ignore_above": 256 } } }, "Occupations": {"properties": {"Code": {"type": "text", "fields": {"keyword": {"type": "keyword", "ignore_above": 256 } } }, "Title": {"type": "text", "fields": {"keyword": {"type": "keyword", "ignore_above": 256 } } }, "code": {"type": "text", "fields": {"keyword": {"type": "keyword", "ignore_above": 256 } } }, "title": {"type": "text", "fields": {"keyword": {"type": "keyword", "ignore_above": 256 } } } } }, "Source": {"type": "text", "fields": {"keyword": {"type": "keyword", "ignore_above": 256 } } }, "from": {"type": "long"}, "query": {"properties": {"bool": {"properties": {"must": {"properties": {"match_all": {"type": "object"} } } } }, "match": {"properties": {"Keyword": {"type": "text", "fields": {"keyword": {"type": "keyword", "ignore_above": 256 } } } } } } }, "scroll": {"type": "text", "fields": {"keyword": {"type": "keyword", "ignore_above": 256 } } }, "scroll_id": {"type": "text", "fields": {"keyword": {"type": "keyword", "ignore_above": 256 } } }, "size": {"type": "long"} } } }, "settings": {"index": {"number_of_shards": "5", "blocks": {"write": "false"}, "analysis": {"filter": {"my_shingle_filter": {"max_shingle_size": "8", "min_shingle_size": "2", "output_unigrams": "true", "type": "shingle"} }, "analyzer": {"analyzer_keyword": {"filter": ["lowercase"], "char_filter": ["code_mapping"], "type": "custom", "tokenizer": "keyword"}, "analyzer_shingle": {"filter": ["lowercase", "my_shingle_filter"], "char_filter": ["code_mapping"], "tokenizer": "standard"} }, "char_filter": {"code_mapping": {"type": "mapping", "mappings": ["++ => plusplus", "c# => csharp", "C# => csharp", "F# => fsharp", "f# => fsharp", ".net => dotnet", ".Net => dotnet", ".NET => dotnet", "( => map_lp", ") => map_rp", "& => and", "# => hash", "+ => plus"] } } }, "number_of_replicas": "2"} } }
so i tried to curl -XPUT localhost:9200/mytaxonomy/ using the above json.
It gave me a error index not available. so I created the index curl -XPUT http://localhost:9200/taxomony_1 and tried to repeat the procedure.
It gave me an error
{"error": {"root_cause": [{"type": "illegal_argument_exception", "reason": "In Shingle TokenFilter the difference between max_shingle_size and min_shingle_size (and +1 if outputting unigrams) must be less than or equal to: [3] but was [7]. This limit can be set by changing the [index.max_shingle_diff] index level setting."} ], "type": "illegal_argument_exception", "reason": "In Shingle TokenFilter the difference between max_shingle_size and min_shingle_size (and +1 if outputting unigrams) must be less than or equal to: [3] but was [7]. This limit can be set by changing the [index.max_shingle_diff] index level setting."}, "status": 400 }
though I have changed the "max_shingle_size": 2 and "min_shingle_size":2 , it gives me error again,
{"error": {"root_cause": [{"type": "mapper_parsing_exception", "reason": "Root mapping definition has unsupported parameters: [keywords : {properties={KeywordType={type=text, fields={keyword={ignore_above=256, type=keyword}}}, Keyword={search_analyzer=analyzer_shingle, analyzer=analyzer_keyword, type=text, fields={analyzed={search_analyzer=analyzer_shingle, analyzer=analyzer_keyword, type=text}, keyword={ignore_above=256, type=keyword}}}, size={type=long}, Occupations={properties={code={type=text, fields={keyword={ignore_above=256, type=keyword}}}, Title={type=text, fields={keyword={ignore_above=256, type=keyword}}}, title={type=text, fields={keyword={ignore_above=256, type=keyword}}}, Code={type=text, fields={keyword={ignore_above=256, type=keyword}}}}}, Commodities={properties={code={type=long}, Title={type=text, fields={keyword={ignore_above=256, type=keyword}}}, title={type=text, fields={keyword={ignore_above=256, type=keyword}}}, Code={type=text, fields={keyword={ignore_above=256, type=keyword}}}}}, query={properties={bool={properties={must={properties={match_all={type=object}}}}}, match={properties={Keyword={type=text, fields={keyword={ignore_above=256, type=keyword}}}}}}}, scroll={type=text, fields={keyword={ignore_above=256, type=keyword}}}, from={type=long}, scroll_id={type=text, fields={keyword={ignore_above=256, type=keyword}}}, Source={type=text, fields={keyword={ignore_above=256, type=keyword}}}}}]"} ], "type": "mapper_parsing_exception", "reason": "Failed to parse mapping [_doc]: Root mapping definition has unsupported parameters: [keywords : {properties={KeywordType={type=text, fields={keyword={ignore_above=256, type=keyword}}}, Keyword={search_analyzer=analyzer_shingle, analyzer=analyzer_keyword, type=text, fields={analyzed={search_analyzer=analyzer_shingle, analyzer=analyzer_keyword, type=text}, keyword={ignore_above=256, type=keyword}}}, size={type=long}, Occupations={properties={code={type=text, fields={keyword={ignore_above=256, type=keyword}}}, Title={type=text, fields={keyword={ignore_above=256, type=keyword}}}, title={type=text, fields={keyword={ignore_above=256, type=keyword}}}, Code={type=text, fields={keyword={ignore_above=256, type=keyword}}}}}, Commodities={properties={code={type=long}, Title={type=text, fields={keyword={ignore_above=256, type=keyword}}}, title={type=text, fields={keyword={ignore_above=256, type=keyword}}}, Code={type=text, fields={keyword={ignore_above=256, type=keyword}}}}}, query={properties={bool={properties={must={properties={match_all={type=object}}}}}, match={properties={Keyword={type=text, fields={keyword={ignore_above=256, type=keyword}}}}}}}, scroll={type=text, fields={keyword={ignore_above=256, type=keyword}}}, from={type=long}, scroll_id={type=text, fields={keyword={ignore_above=256, type=keyword}}}, Source={type=text, fields={keyword={ignore_above=256, type=keyword}}}}}]", "caused_by": {"type": "mapper_parsing_exception", "reason": "Root mapping definition has unsupported parameters: [keywords : {properties={KeywordType={type=text, fields={keyword={ignore_above=256, type=keyword}}}, Keyword={search_analyzer=analyzer_shingle, analyzer=analyzer_keyword, type=text, fields={analyzed={search_analyzer=analyzer_shingle, analyzer=analyzer_keyword, type=text}, keyword={ignore_above=256, type=keyword}}}, size={type=long}, Occupations={properties={code={type=text, fields={keyword={ignore_above=256, type=keyword}}}, Title={type=text, fields={keyword={ignore_above=256, type=keyword}}}, title={type=text, fields={keyword={ignore_above=256, type=keyword}}}, Code={type=text, fields={keyword={ignore_above=256, type=keyword}}}}}, Commodities={properties={code={type=long}, Title={type=text, fields={keyword={ignore_above=256, type=keyword}}}, title={type=text, fields={keyword={ignore_above=256, type=keyword}}}, Code={type=text, fields={keyword={ignore_above=256, type=keyword}}}}}, query={properties={bool={properties={must={properties={match_all={type=object}}}}}, match={properties={Keyword={type=text, fields={keyword={ignore_above=256, type=keyword}}}}}}}, scroll={type=text, fields={keyword={ignore_above=256, type=keyword}}}, from={type=long}, scroll_id={type=text, fields={keyword={ignore_above=256, type=keyword}}}, Source={type=text, fields={keyword={ignore_above=256, type=keyword}}}}}]"} }, "status": 400 }
Though I didnt modify any thing the mapping of the source it gives me unsupported parameters. what could be the issue? how to copy the setting and mapping of the source index?