@@ -335,8 +335,7 @@ func processLogsQuery(q *Query, b *es.SearchRequestBuilder, from, to int64, defa
335
335
sort = es .SortOrderAsc
336
336
}
337
337
b .Sort (sort , defaultTimeField , "boolean" )
338
- // FIXME: check if sort by _doc is needed.
339
- // b.Sort(sort, "_doc", "")
338
+ b .Sort (sort , "_doc" , "" )
340
339
b .Size (stringToIntWithDefaultValue (metric .Settings .Get ("limit" ).MustString (), defaultSize ))
341
340
// TODO when hightlight is supported in quickwit
342
341
// b.AddHighlight()
@@ -352,7 +351,7 @@ func processLogsQuery(q *Query, b *es.SearchRequestBuilder, from, to int64, defa
352
351
func processDocumentQuery (q * Query , b * es.SearchRequestBuilder , from , to int64 , defaultTimeField string ) {
353
352
metric := q .Metrics [0 ]
354
353
b .Sort (es .SortOrderDesc , defaultTimeField , "boolean" )
355
- // b.Sort(es.SortOrderDesc, "_doc", "")
354
+ b .Sort (es .SortOrderDesc , "_doc" , "" )
356
355
// Note: not supported in Quickwit
357
356
// b.AddDocValueField(defaultTimeField)
358
357
b .Size (stringToIntWithDefaultValue (metric .Settings .Get ("size" ).MustString (), defaultSize ))
0 commit comments