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

407
Visualizações
Elasticsearch: How to represent an undefined date in search_after in descending order using javascript client?

I'm struggling with numeric type precision differences between Javascript and Elasticsearch. I'm having a date property that is optional, and for some documents is undefined. While searching for documents in descending order of that date, when I reach the part where the date is undefined, the sort property of response has the following value:

"sort": [-9223372036854775808, "some tie-breaker uuid"]

I know that in Javascript this value is modified to the closest numeric value, but it is not a problem because I know what value I should pass. When I try to work around it by passing it as a string to search_after I receive parse_exception but when it is passed as a number (in Postman, not in JS client), everything is fine.

How to pass the minimum long value as a timestamp when Javascript doesn't allow to store such value, and strings are not accepted?

Thanks for any hints!

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