Geo Shape Query Usageedit

Fluent DSL exampleedit

s => s
.Query(q => q
    .GeoShapeEnvelope(c => c
        .Name("named_query")
        .Boost(1.1)
        .Field(p => p.Envelope)
        .Coordinates(this._coordinates)
        .Relation(GeoShapeRelation.Intersects)
        .IgnoreUnmapped()
    )
)

Object Initializer syntax exampleedit

new SearchRequest<Framework.MockData.Shape>
{
    Query = new GeoShapeEnvelopeQuery
    {
        Name = "named_query",
        Boost = 1.1,
        Field = Infer.Field<Framework.MockData.Shape>(p => p.Envelope),
        Shape = new EnvelopeGeoShape(this._coordinates),
        Relation = GeoShapeRelation.Intersects,
        IgnoreUnmapped = true
    }
}

Handling Responsesedit

response.ShouldBeValid();
response.Documents.Count.Should().Be(10);