Geo Shape Geometry Collection Query Usageedit

Fluent DSL exampleedit

q
.GeoShapeGeometryCollection(c => c
    .Name("named_query")
    .Boost(1.1)
    .Field(p => p.LocationShape)
    .Geometries(
        new PointGeoShape(PointCoordinates),
        new MultiPointGeoShape(MultiPointCoordinates),
        new LineStringGeoShape(LineStringCoordinates),
        new MultiLineStringGeoShape(MultiLineStringCoordinates),
        new PolygonGeoShape(PolygonCoordinates),
        new MultiPolygonGeoShape(MultiPolygonCoordinates)
    )
    .Relation(GeoShapeRelation.Intersects)
)

Object Initializer syntax exampleedit

new GeoShapeGeometryCollectionQuery
{
    Name = "named_query",
    Boost = 1.1,
    Field = Infer.Field<Project>(p => p.LocationShape),
    Shape = new Nest.GeometryCollection
    {
        Geometries = new IGeoShape[]
        {
            new PointGeoShape(PointCoordinates),
            new MultiPointGeoShape(MultiPointCoordinates),
            new LineStringGeoShape(LineStringCoordinates),
            new MultiLineStringGeoShape(MultiLineStringCoordinates),
            new PolygonGeoShape(PolygonCoordinates),
            new MultiPolygonGeoShape(MultiPolygonCoordinates),
        }
    },
    Relation = GeoShapeRelation.Intersects,
}