next up previous contents index
Next: Learning weights Up: Parametric and zone indexes Previous: Parametric and zone indexes   Contents   Index

Weighted zone scoring

Thus far in Section 6.1 we have focused on retrieving documents based on Boolean queries on fields and zones. We now turn to a second application of zones and fields.

Given a Boolean query $q$ and a document $d$, weighted zone scoring assigns to the pair $(q,d)$ a score in the interval $[0,1]$, by computing a linear combination of zone scores, where each zone of the document contributes a Boolean value. More specifically, consider a set of documents each of which has $\ell$ zones. Let $g_1, \ldots, g_\ell\in [0,1]$ such that $\sum_{i=1}^\ell g_i = 1$. For $1\leq i\leq \ell$, let $s_i$ be the Boolean score denoting a match (or absence thereof) between $q$ and the $i$th zone. For instance, the Boolean score from a zone could be 1 if all the query term(s) occur in that zone, and zero otherwise; indeed, it could be any Boolean function that maps the presence of query terms in a zone to ${0,1}$. Then, the weighted zone score is defined to be

\sum_{i=1}^\ell g_i s_i.
\end{displaymath} (13)

Weighted zone scoring is sometimes referred to also as ranked Boolean retrieval .

Worked example. Consider the query shakespeare in a collection in which each document has three zones: author, title and body. The Boolean score function for a zone takes on the value 1 if the query term shakespeare is present in the zone, and zero otherwise. Weighted zone scoring in such a collection would require three weights $g_1, g_2$ and $g_3$, respectively corresponding to the author, title and body zones. Suppose we set $g_1=0.2, g_2=0.3$ and $g_3=0.5$ (so that the three weights add up to 1); this corresponds to an application in which a match in the author zone is least important to the overall score, the title zone somewhat more, and the body contributes even more.

Thus if the term shakespeare were to appear in the title and body zones but not the author zone of a document, the score of this document would be 0.8. End worked example.

How do we implement the computation of weighted zone scores? A simple approach would be to compute the score for each document in turn, adding in all the contributions from the various zones. However, we now show how we may compute weighted zone scores directly from inverted indexes. The algorithm of Figure 6.4 treats the case when the query $q$ is a two-term query consisting of query terms $q_1$ and $q_2$, and the Boolean function is AND: 1 if both query terms are present in a zone and 0 otherwise. Following the description of the algorithm, we describe the extension to more complex queries and Boolean functions.

% latex2html id marker 7761
...umed to compute the inner loop of Equation~\ref{eqn:weightedzone}.}

The reader may have noticed the close similarity between this algorithm and that in Figure 1.6 . Indeed, they represent the same postings traversal, except that instead of merely adding a document to the set of results for a Boolean AND query, we now compute a score for each such document. Some literature refers to the array scores[] above as a set of accumulators . The reason for this will be clear as we consider more complex Boolean functions than the AND; thus we may assign a non-zero score to a document even if it does not contain all query terms.

next up previous contents index
Next: Learning weights Up: Parametric and zone indexes Previous: Parametric and zone indexes   Contents   Index
© 2008 Cambridge University Press
This is an automatically generated page. In case of formatting errors you may want to look at the PDF edition of the book.