Skip to content

icu_collation_keyword property not supported #3049

@cguedel

Description

@cguedel

NEST/Elasticsearch.Net version: v6.0.0-rc1

Elasticsearch version: 6.1.1

Description of the problem including expected versus actual behavior:
We need to use the icu_collation_keyword property type for our mappings. In the previous version of NEST, we used a custom implementation of IProperty (code below). However, since upgrading the package to v6.0.0-rc1, the properties marked with the JsonProperty don't get serialized anymore.

Expected behavior: either an already existing implementation of the icu_collation_keyword or the proper serialization of properties marked with JsonProperty.

Steps to reproduce:

  1. Use the below implementation of a property
  2. Field is mapped as "type": "icu_collation_keyword", but all other properties (language and so on) are missing
        public class IcuCollationKeywordProperty : IProperty
	{
		public IcuCollationKeywordProperty(string name, string language)
		{
			this.Name = new PropertyName(name);
			this.Type = "icu_collation_keyword";
			this.Language = language;
			this.Variant = "@collation=standard";
			this.Strength = "primary";
			this.Numeric = true;
		}

		public IcuCollationKeywordProperty(string language)
			: this(null, language)
		{
		}

		public string Type { get; set; }

		public PropertyName Name { get; set; }

		public IDictionary<string, object> LocalMetadata { get; set; }

		[JsonProperty("language")]
		public string Language { get; set; }

		[JsonProperty("strength")]
		public string Strength { get; set; }

		[JsonProperty("variant")]
		public string Variant { get; set; }

		[JsonProperty("numeric")]
		public bool Numeric { get; set; }
	}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions