Information retrieval (source code)

= Information retrieval

<Information retrieval> finds material relevant to an information need within a collection, commonly documents or passages. A query expresses part of that need; a retrieval system selects or ranks candidate material. Relevance is therefore part of the task, beyond simply checking whether a stored identifier matches.<Introduction to Information Retrieval by Christopher D. Manning and others>[Chapter 1, Boolean retrieval, opening definition and search examples]{ref}

For example, suppose a query returns five documents, three relevant, while the collection contains six relevant documents altogether. Its <precision (information retrieval)> is $3/5$, while its <recall (information retrieval)> is $3/6$. Returning everything increases coverage but can overwhelm the user with irrelevant material. An <inverted index> accelerates term lookup; scoring and evaluation address which retrieved results are useful. <Information retrieval> consequently combines <data structures>, ranking <algorithms> and evidence about the user's task.