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

108
Vistas
cts query to filter documents from a particular collection for the last 24 hours

I have been trying to find the documents from a particular collection based on the field report_time.

I have been trying the below query. But, it doesn't work.

cts.andQuery(cts.collectionQuery('myCollection'),cts.jsonPropertyRangeQuery("report_time", ">", new Date(Date.now() - 86400 * 1000).toISOString()))
about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

From that snippet, the one thing that needs adjustment is that the query criteria need to be in an array for the cts.andQuery() param:

cts.andQuery([
  cts.collectionQuery('myCollection'),
  cts.jsonPropertyRangeQuery("report_time", ">", new Date(Date.now() - 86400 * 1000).toISOString())
])
about 4 years ago · Juan Pablo Isaza Denunciar

0

You don't have to do the math, you can use an "age query". See the end of the page at https://docs.marklogic.com/guide/search-dev/rangequery

about 4 years ago · Juan Pablo Isaza Denunciar
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