You are looking at documentation for an older release.
Not what you want? See the
current release documentation.
Geo Indexed Shape Usageedit
Fluent DSL Exampleedit
q .GeoIndexedShape(c => c .Name("named_query") .Boost(1.1) .Field(p=>p.Location) .IndexedShape(p=>p .Id(2) .Path(pp=>pp.Location) ) .Relation(GeoShapeRelation.Intersects) )
Object Initializer Syntax Exampleedit
new GeoIndexedShapeQuery { Name = "named_query", Boost = 1.1, Field = Field<Project>(p=>p.Location), IndexedShape = new FieldLookup { Id = 2, Index = Index<Project>(), Type = Type<Project>(), Path = Field<Project>(p=>p.Location), }, Relation = GeoShapeRelation.Intersects }
Example json output.
{ "geo_shape": { "location": { "_name": "named_query", "boost": 1.1, "indexed_shape": { "id": 2, "type": "project", "index": "project", "path": "location" }, "relation": "intersects" } } }