Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

403
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda