-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of github.com:elasticsearch/elasticsearch-net …
…into develop
- Loading branch information
Showing
19 changed files
with
39 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 10 additions & 13 deletions
23
src/Nest/Domain/Mapping/Descriptors/GeoPointMappingDescriptor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,39 @@ | ||
using System; | ||
using System.Linq.Expressions; | ||
using Nest.Resolvers; | ||
|
||
namespace Nest | ||
{ | ||
public class GeoShapeMappingDescriptor<T> | ||
public class GeoPointMappingDescriptor<T> | ||
{ | ||
internal GeoShapeMapping _Mapping = new GeoShapeMapping(); | ||
internal GeoPointMapping _Mapping = new GeoPointMapping(); | ||
|
||
public GeoShapeMappingDescriptor<T> Name(string name) | ||
public GeoPointMappingDescriptor<T> Name(string name) | ||
{ | ||
this._Mapping.Name = name; | ||
return this; | ||
} | ||
public GeoShapeMappingDescriptor<T> Name(Expression<Func<T, object>> objectPath) | ||
public GeoPointMappingDescriptor<T> Name(Expression<Func<T, object>> objectPath) | ||
{ | ||
this._Mapping.Name = objectPath; | ||
return this; | ||
} | ||
|
||
public GeoShapeMappingDescriptor<T> Tree(GeoTree geoTree) | ||
public GeoPointMappingDescriptor<T> IndexLatLon(bool indexLatLon = true) | ||
{ | ||
this._Mapping.Tree = geoTree; | ||
this._Mapping.IndexLatLon = indexLatLon; | ||
return this; | ||
} | ||
|
||
public GeoShapeMappingDescriptor<T> TreeLevels(int treeLevels) | ||
public GeoPointMappingDescriptor<T> IndexGeoHash(bool indexGeoHash = true) | ||
{ | ||
this._Mapping.TreeLevels = treeLevels; | ||
this._Mapping.IndexGeoHash = indexGeoHash; | ||
return this; | ||
} | ||
|
||
public GeoShapeMappingDescriptor<T> DistanceErrorPercentage(double distanceErrorPercentage) | ||
public GeoPointMappingDescriptor<T> GeoHashPrecision(int geoHashPrecision) | ||
{ | ||
this._Mapping.DistanceErrorPercentage = distanceErrorPercentage; | ||
this._Mapping.GeoHashPrecision = geoHashPrecision; | ||
return this; | ||
} | ||
|
||
|
||
} | ||
} |
24 changes: 10 additions & 14 deletions
24
src/Nest/Domain/Mapping/Descriptors/GeoShapeMappingDescriptor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,39 @@ | ||
using System; | ||
using System.Linq.Expressions; | ||
using Nest.Resolvers; | ||
|
||
namespace Nest | ||
{ | ||
public class GeoPointMappingDescriptor<T> | ||
public class GeoShapeMappingDescriptor<T> | ||
{ | ||
internal GeoPointMapping _Mapping = new GeoPointMapping(); | ||
internal GeoShapeMapping _Mapping = new GeoShapeMapping(); | ||
|
||
public GeoPointMappingDescriptor<T> Name(string name) | ||
public GeoShapeMappingDescriptor<T> Name(string name) | ||
{ | ||
this._Mapping.Name = name; | ||
return this; | ||
} | ||
public GeoPointMappingDescriptor<T> Name(Expression<Func<T, object>> objectPath) | ||
public GeoShapeMappingDescriptor<T> Name(Expression<Func<T, object>> objectPath) | ||
{ | ||
this._Mapping.Name = objectPath; | ||
return this; | ||
} | ||
|
||
|
||
public GeoPointMappingDescriptor<T> IndexLatLon(bool indexLatLon = true) | ||
public GeoShapeMappingDescriptor<T> Tree(GeoTree geoTree) | ||
{ | ||
this._Mapping.IndexLatLon = indexLatLon; | ||
this._Mapping.Tree = geoTree; | ||
return this; | ||
} | ||
|
||
public GeoPointMappingDescriptor<T> IndexGeoHash(bool indexGeoHash = true) | ||
public GeoShapeMappingDescriptor<T> TreeLevels(int treeLevels) | ||
{ | ||
this._Mapping.IndexGeoHash = indexGeoHash; | ||
this._Mapping.TreeLevels = treeLevels; | ||
return this; | ||
} | ||
|
||
public GeoPointMappingDescriptor<T> GeoHashPrecision(int geoHashPrecision) | ||
public GeoShapeMappingDescriptor<T> DistanceErrorPercentage(double distanceErrorPercentage) | ||
{ | ||
this._Mapping.GeoHashPrecision = geoHashPrecision; | ||
this._Mapping.DistanceErrorPercentage = distanceErrorPercentage; | ||
return this; | ||
} | ||
|
||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters