Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

143
Visualizações
How to correctly set the sort mode of a query with Bodybuilder?

I've picked up a project that uses Bodybuilder.js for queries to ELK and I am struggling to figure out how to format the query with Bodybuilder. I should note that I've tested this same query in other languages and it worked fine.

As I had written it previously it was:

"sort" {
    "duration": {
        "order": "desc",
        "mode": "max"
    }
}

As far as I can tell from the docs (end of the last example) it should be written something like:

.sort([{ "duration": { "order": "desc", "mode": "max" }}])

but this query is giving me an error from the server. I should note that:

.sort("duration", "desc")

on the other hand does not give an error, but does not give the desired result, just to clear up any concern about the key itself.

Information on this is a bit sparse but hopefully someone who's ran into this before can offer some help as the docs aren't giving me more than I mentioned and that's not working.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda