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

636
Vistas
Too many arguments provided to startAt

I am trying to search Firestore documents using StartAt() and EndAt() but I keep getting the error

Too many arguments provided to startAt(). The number of arguments must be less than or equal to the number of orderBy() clauses.

I also have OrderBy included as indicated in this stackoverflow post -> Firebase Error - Too many arguments provided to Query.startAt()

The firestore query is being called as part of AutoCompleteTextView, not sure whats the issue here....

val mIndFilter = FirebaseFirestore.getInstance()
mIndFilter.collection("Industries").orderBy("industry").startAt(queryString).endAt(queryString + '\uf8ff').limit(5).get()
    .addOnCompleteListener {
       if(it.isSuccessful){
               allIndList = it.result.toObjects(Industries::class.java)
       }
    }
    .addOnFailureListener { exception ->
        Log.e("Ind Search Filter fail", "Error adding document $exception")
    }
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

i literally ran into the same problem yesterday. here is how i solved it. hopefully it works for you too. use where clauses instead of startAt and endAt.

.collection("Industries")
    .orderBy("Industries", "asc")
    .where("Industries", ">=", queryString)
    .where("Industries", "<=", queryString + "\uf8ff")
    .limit(5)
    .get();
over 4 years ago · Santiago Trujillo 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