Skip to content

Specifying .Analyzer in mapping destroys the GeoPoint mapping. #2498

Closed
@daluas

Description

@daluas

NEST/Elasticsearch.Net version: 5.0.0.0

Elasticsearch version:
"version" : {
"number" : "5.1.1",
"build_hash" : "5395e21",
"build_date" : "2016-12-06T12:36:15.409Z",
"build_snapshot" : false,
"lucene_version" : "6.3.0"
}

Description of the problem including expected versus actual behavior:
Specify the .Analyzer property in CreateIndex -> .Mappings section, crete a strange mapping:

"location":{"properties":{"lat":{"type":"float"},"lon":{"type":"float"}}}

If I'm omitting the .Analyzer and let the NEST select its default analyzer, in that case, the GeoPoint filed is correctly mapped as expected: "location":{"type":"geo_point"}

Provide ConnectionSettings (if relevant):

elasticClient.CreateIndex(usersIndex, i => indexDescriptor
.InitializeUsing(indexDescriptor)
.Mappings(ms => ms.Map(m => m.AutoMap()
.Properties(prop => prop.GeoPoint(geo => geo.Name(g => g.Location)))
//.Analyzer("whitespace")
))
);

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