Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

nest elasticsearch date reange c# .net

q
.DateRange(c => c
    .Name("named_query")
    .Boost(1.1)
    .Field(p => p.Description)
    .GreaterThan(FixedDate)
    .GreaterThanOrEquals(DateMath.Anchored(FixedDate).RoundTo(DateMathTimeUnit.Month))
    .LessThan("01/01/2012")
    .LessThanOrEquals(DateMath.Now)
    .Format("dd/MM/yyyy||yyyy")
    .TimeZone("+01:00")
)
Source by www.elastic.co #
 
PREVIOUS NEXT
Tagged: #nest #elasticsearch #date #reange
ADD COMMENT
Topic
Name
8+6 =