I'm on NEST v6.3.1, ElasticSearch v6.4.2
I can't get my field to be indexed as a keyword.
I've tried both attributes:
[Keyword]
public string Suburb { get; set; }
and fluent:
client.CreateIndex(indexName, i => i
.Mappings(ms => ms
.Map<Listing>(m => m
.Properties(ps => ps
.Keyword(k => k
.Name(n => n.Suburb)))
.AutoMap())
.Map<Agent>(m => m
.AutoMap())
.Map<BuildingDetails>(m => m
.AutoMap())
.Map<LandDetails>(m => m
.AutoMap())
)
);
Both result in the same thing:
{
"listings": {
"mappings": {
"listing": {
"properties": {
"suburb": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
}
}
}
e.g doesn't match what i'm seeing here: https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/attribute-mapping.html
Same thing happens when i try and use [GeoPoint]
. Should be type geopoint, but it's mapped to floats:
"latLong": {
"properties": {
"lat": {
"type": "float"
},
"lon": {
"type": "float"
}
}
}
So i'm missing something, just not sure what.
Any help?
Thanks