Search based on a user query (sometimes called ad hoc search because the range of possible queries is huge and not prespecified) is not the only text-based task that is studied in information retrieval.
Other tasks include filtering, classification, and question answering