- Introduced by
- Bernard J. Jansen, Amanda Spink & Tefko Saracevic; Silverstein et al.
- Year
- 2000
- Type
- Transaction-log analysis pipeline for search behavior
- Family
- Information-seeking behavior / IR evaluation
What does it do?
Query log analysis, also called transaction-log analysis, studies the records that search systems keep automatically of what users queried, which results they viewed, and when.
It observes real searches as they happened, rather than asking users to recall their behavior or testing them in the laboratory. In a study of roughly one billion AltaVista query entries recorded over six weeks, Silverstein and colleagues reported that web users type short queries, mostly view only the first 10 results, and seldom modify their query. These figures come from a single search engine in the late 1990s, so they show what the method can reveal, not current norms; any other system, including a library catalogue, must be measured with its own logs. By cleaning logs, reconstructing sessions, and tabulating term, query, and session statistics, the method turns server records into a behavioral picture of search.
The intuition behind the method
Surveys ask people how they search, but people misremember and idealize their habits. A query log avoids this problem because the search system already records the queries, timestamps, and viewed or clicked results, so the evidence exists and only needs to be read at scale. Silverstein and colleagues' analysis of AltaVista (one engine, six weeks, late 1990s) found that web users differed from the user assumed in standard information retrieval literature: they typed short queries, mostly looked at the first 10 results, and seldom reformulated. Their correlation analysis also found that the most strongly associated terms were constituents of phrases, which they suggested could be useful for search engines to consider. Patterns like these are what the method is designed to surface, and they bear directly on whether a system built for elaborate queries suits the queries people actually send. Because the numbers are specific to that engine and period, a new study should measure its own population rather than assume them.
History
Silverstein, Marais, Henzinger, and Moricz analysed approximately one billion AltaVista query entries recorded over six weeks, and reported in ACM SIGIR Forum in 1999 that web users typed short queries, mostly viewed the first 10 results, and seldom modified their queries. In 2000 Bernard Jansen, Amanda Spink, and Tefko Saracevic published a study and analysis of user queries on the web in Information Processing & Management, a standard follow-up reference on real web searching. Earlier origins of transaction-log analysis outside the web setting are not covered here.
When to use it
Choose query log analysis when you need to know how real users search a system at scale, using naturally occurring data rather than self-report or laboratory tasks. It fits a library catalog, digital library, intranet, or web engine for which you already hold server-side records with timestamps and, ideally, session identifiers. It answers descriptive questions, such as what people query, how long their queries are, and how deeply they browse results. Before starting, define the log population and its coverage (which interfaces, user groups, and periods the log includes), because findings generalize only to the users and system that produced the log. Do not choose it when your question concerns intent, satisfaction, or reasons, because logs show what was done but not why; pair them with surveys or interviews instead. It is also a poor fit when logs are sparse, heavily anonymized, or restricted by consent or privacy rules that prevent the analysis you need.
Limitations and considerations
- Logs record actions, not intentions or satisfaction, so an abandoned session cannot be distinguished from one in which the need was met.
- Session boundaries come from a timeout and identifier heuristic; the roughly 30-minute convention in this method can split a single task or merge unrelated ones.
- Views are inferred from logged requests and clicks, so a result that was seen on the page but not clicked leaves no trace.
- Cleaning involves judgment: bot-filtering and de-duplication rules change the resulting statistics, so the choices must be reported.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Observes what a whole user population did on the live system, avoiding the recall and self-presentation bias of surveys and interviews.
- Uses records the system already keeps, so it needs no recruited participants or task design.
- Can test long-standing assumptions about users: Silverstein and colleagues compared observed web users with the user assumed in standard IR literature and found them to differ.
- Yields distributions of query length, term frequency, and results viewed that a designer can compare directly with the assumptions behind a ranking or interface.
Applications
- Characterizing how users search library catalogs, digital libraries, and discovery systems.
- Informing search-interface, ranking, autocomplete, and query-suggestion design from real demand patterns.
- Detecting failed searches, zero-result queries, and unmet information needs for collection and system improvement.
- Studying query reformulation, vocabulary, and term-frequency distributions in web and enterprise search.
- Building query-suggestion, caching, and spelling-correction resources from aggregated log statistics.
How it works
How it works
The raw transaction log is first parsed into structured records containing a user or IP identifier, the query string, a timestamp, and the action taken, such as a search, a page view, or a click. Cleaning then removes automated traffic, normalizes encodings and letter case, and discards malformed records. Because logs are operational artifacts rather than prepared research data, this step limits every later result: unfiltered bot traffic or mis-parsed records can distort the statistics that follow.
Formula
\mathcal{L}=\{(u,q,t,\text{action})\},\quad \text{filter bots, normalize, parse records}Users usually issue several queries to satisfy one information need, so the records are grouped into sessions. A common heuristic starts a new session when a user has been inactive longer than a timeout, or when the user identifier changes. A timeout of about 30 minutes is widely used by analysts, but it is a convention and not a finding of the cited studies: a pause within one task can split a session, and a shared IP address can merge several users. Session boundaries also determine the session-level measures computed later, so the setting should be reported and results checked under alternative timeouts.
Formula
\text{new session if } \Delta t > \tau\ \text{or user/IP changes},\qquad \tau\ \text{set by convention (often}\approx 30\ \text{min), varied as a robustness check}With clean, sessionized data the analysis tabulates query-level statistics: the mean number of terms per query, the distribution of query lengths, and the share of queries that use Boolean operators or other advanced syntax. Silverstein and colleagues reported that web queries were short; the operator share is measured directly from the log and should be interpreted for the system and population studied. Together these distributions describe the linguistic shape of real demand on a system.
Formula
\bar{\ell}=\frac{1}{|Q|}\sum_{q} |q|\ \text{(terms/query)},\qquad p_{\text{op}}=\frac{\#\text{queries with operators}}{|Q|}The analysis then examines how often each search term occurs. Term frequencies are typically heavy-tailed, with a small number of terms accounting for a large share of queries and many terms appearing rarely. A rank-frequency power law (Zipfian) is a common modelling assumption for this relationship, and it should be tested on your own data rather than assumed. The shape matters for design because it shows which terms dominate demand, how heavy the long tail is, and where caching or query suggestion would be most useful.
Formula
f(r)\propto r^{-\alpha}\quad(\text{Zipfian rank-frequency of search terms})Finally the pipeline computes session- and behavior-level measures: the average number of result pages viewed, the average number of queries per session, and the share of sessions in which only the first results page was requested. The first-page measure depends on the interface, since what counts as the first page depends on how many results are shown per page; report the page-size setting with it and do not compare it across interfaces with different page sizes without adjustment. Silverstein and colleagues reported that web users mostly looked at only the first 10 results and seldom modified their query. These measures connect demand statistics to how users consume results.
Formula
\overline{\text{pages}},\ \overline{\text{queries/session}},\ p_{\text{first}}=\frac{\#\text{sessions requesting only the first results page}}{\#\text{sessions}}\ (\text{state results per page})Common pitfalls
- Reading the first-page-only figure as disinterest in deeper results, when the figure depends on how many results the interface shows per page.
- Skipping bot filtering and normalization, so automated traffic inflates query counts and distorts term statistics.
- Treating term co-occurrence as evidence of phrase intent, when the association Silverstein and colleagues reported is a pattern in the logs, not a stated user intention.
- Fitting a power law to term frequencies without checking the fit or its sensitivity to the tail of rare terms.
- Releasing logs without adequate anonymization, since the queries themselves can reveal who issued them.
Frequently asked questions
What did the foundational query log studies find?
The best-documented result comes from Silverstein and colleagues' analysis of approximately one billion AltaVista entries recorded over six weeks. They reported that web users type short queries, mostly look at only the first 10 results, and seldom modify their query, and that these users differ from the user assumed in standard information retrieval literature. Their correlation analysis found that the most highly correlated terms were constituents of phrases, which they suggested search engines might consider. Jansen, Spink, and Saracevic's 2000 study of user queries on the web is another standard reference on real web searching.
How is a session identified in a query log?
By heuristics, since logs rarely mark sessions explicitly. The usual approach starts a new session when a user is inactive for longer than a timeout, or when the identifying field (login, cookie, or IP address) changes. The method's formula uses a timeout of about 30 minutes, but that value is a convention rather than a result, so it should be stated and varied as a robustness check. A single long task can be split by a pause, unrelated tasks close together can be merged, and shared IP addresses can blend several users.
Can query logs tell you whether users were satisfied?
Only indirectly and unreliably. Logs record observable actions — queries, clicks, pages viewed, dwell signals — but not the user's goal or whether it was met, so satisfaction must be inferred from proxies like clicks, reformulation, or abandonment, all of which are ambiguous (a quick exit can mean success or frustration). This is the core limitation of the method: it answers what users did, not why or how well. To capture intent and satisfaction, query log analysis is paired with surveys, interviews, or controlled user studies that supply the missing why.
Related methods
Sources
Jansen, B. J., Spink, A., & Saracevic, T. (2000). Real life, real users, and real needs: a study and analysis of user queries on the web. Information Processing & Management, 36(2), 207-227.
Open DOI referenceSilverstein, C., Marais, H., Henzinger, M., & Moricz, M. (1999). Analysis of a very large web search engine query log. ACM SIGIR Forum, 33(1), 6-12.
Open DOI referenceManning, C. D., Raghavan, P., & Schütze, H. (2008). Introduction to Information Retrieval. Cambridge University Press.
ISBN: 9780521865715