-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Description
I'm trying to index this Dictionary as not_analyzed but it's not mapping correctly:
[ElasticProperty(Type = FieldType.nested, Index = FieldIndexOption.not_analyzed)]
public IDictionary<string, List<FilterAttributeOption>> Specifications { get; set; }
public class FilterAttributeOption
{
[ElasticProperty(Index = FieldIndexOption.not_analyzed)]
public int FilterId { get; set; }
[ElasticProperty(Index = FieldIndexOption.not_analyzed)]
public string Name { get; set; }
[JsonIgnore]
public string FilterUrl { get; set; }
}
elasticsearchClient.CreateIndex(_elasticsearchCoreSettings.IndexName, s => s
.AddMapping<ProductExt>(m => m.MapFromAttributes())
.NumberOfReplicas(1)
.NumberOfShards(1)
);
How can i map my dictionary to be not_analyzed? Is there a default to use on all my properties to be not_analyzed?
example of mapping:
"specifications" : {
"type" : "nested",
"properties" : {
"binnenvoering" : {
"properties" : {
"filterId" : {
"type" : "long"
},
"name" : {
"type" : "string"
}
}
},
"bovenmateriaal" : {
"properties" : {
"filterId" : {
"type" : "long"
},
"name" : {
"type" : "string"
}
}
},
"geslacht" : {
"properties" : {
"filterId" : {
"type" : "long"
},
"name" : {
"type" : "string"
}
}
},
"hakhoogte" : {
"properties" : {
"filterId" : {
"type" : "long"
},
"name" : {
"type" : "string"
}
}
},
"hakvorm" : {
"properties" : {
"filterId" : {
"type" : "long"
},
"name" : {
"type" : "string"
}
}
},
"kleur" : {
"properties" : {
"filterId" : {
"type" : "long"
},
"name" : {
"type" : "string"
}
}
},
"leeftijd" : {
"properties" : {
"filterId" : {
"type" : "long"
},
"name" : {
"type" : "string"
}
}
},
"length" : {
"type" : "integer"
},
"seizoen" : {
"properties" : {
"filterId" : {
"type" : "long"
},
"name" : {
"type" : "string"
}
}
},
"status" : {
"properties" : {
"filterId" : {
"type" : "long"
},
"name" : {
"type" : "string"
}
}
},
"type" : {
"properties" : {
"filterId" : {
"type" : "long"
},
"name" : {
"type" : "string"
}
}
},
"uitneembare_zool" : {
"properties" : {
"filterId" : {
"type" : "long"
},
"name" : {
"type" : "string"
}
}
}
}
},