@@ -335,8 +335,7 @@ func processLogsQuery(q *Query, b *es.SearchRequestBuilder, from, to int64, defa
335335 sort = es .SortOrderAsc
336336 }
337337 b .Sort (sort , defaultTimeField , "boolean" )
338- // FIXME: check if sort by _doc is needed.
339- // b.Sort(sort, "_doc", "")
338+ b .Sort (sort , "_doc" , "" )
340339 b .Size (stringToIntWithDefaultValue (metric .Settings .Get ("limit" ).MustString (), defaultSize ))
341340 // TODO when hightlight is supported in quickwit
342341 // b.AddHighlight()
@@ -352,7 +351,7 @@ func processLogsQuery(q *Query, b *es.SearchRequestBuilder, from, to int64, defa
352351func processDocumentQuery (q * Query , b * es.SearchRequestBuilder , from , to int64 , defaultTimeField string ) {
353352 metric := q .Metrics [0 ]
354353 b .Sort (es .SortOrderDesc , defaultTimeField , "boolean" )
355- // b.Sort(es.SortOrderDesc, "_doc", "")
354+ b .Sort (es .SortOrderDesc , "_doc" , "" )
356355 // Note: not supported in Quickwit
357356 // b.AddDocValueField(defaultTimeField)
358357 b .Size (stringToIntWithDefaultValue (metric .Settings .Get ("size" ).MustString (), defaultSize ))
0 commit comments