Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

320
Views
Consulta de Firestore usando múltiples where, orderBy y startAt, endAt

Entonces tengo una consulta como esta.

 firestore() .collection('posts') .where('category', '==', category) .orderBy('price', 'asc') .startAt(minPrice) .endAt(maxPrice) .orderBy('title', 'asc') .startAt(searchString) .endAt(`${searchString}\uf8ff`) .limit(10) .get() .then(res => { console.log(res.docs); setPosts(res.docs); })

Donde filtro primero por categoría y luego quiero filtrar por precio en y entre el precio mínimo y máximo

Después de eso, también quiero ejecutar este filtro.

 .orderBy('title', 'asc') .startAt(searchString) .endAt(`${searchString}\uf8ff`)

Para obtener la coincidencia de cadena parcial en el título

La consulta se ejecuta sin ningún error, pero siempre devuelve una matriz vacía. Hay alguien que me puede ayudar con este problema.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!