When the person or thing a relative clause describes is not known to exist - you are looking for it, asking whether it exists, or denying that it does - the clause takes the subjunctive. When you are talking about a specific person or thing you already know, the clause stays in the indicative. The trigger words are typically buscar, necesitar, querer, ¿hay...?, ¿conoces a alguien...? and no hay nadie / nada.
Examples
- Busco un trabajo que me permita viajar.
- I'm looking for a job that lets me travel. (not yet found - subjunctive)
- Tengo un trabajo que me permite viajar.
- I have a job that lets me travel. (a real, known job - indicative)
- No hay nadie que hable chino en la oficina.
- There is nobody who speaks Chinese in the office. (existence denied - subjunctive)
- ¿Conoces a alguien que sepa programar?
- Do you know anyone who can code? (existence in question - subjunctive)
The mistake to avoid
Learners keep the indicative after buscar and necesitar: "Necesito un piso que tiene balcón" should be "que tenga balcón" unless you already have one specific flat in mind.
Where this fits in
Mundo laboral y formación, Spanish B2: Talk about job hunting, life inside a company and professional training: the subjunctive after an unknown antecedent, purpose clauses with para que, and the vocabulary of work and study.