Hacker News new | ask | show | jobs
by kindle-dev 1721 days ago
When is an index more useful than full text search? I derive a lot of pleasure when I can open a huge text on my laptop and instantly find exactly what I'm working for by searching for one or two words.
5 comments

Good indexes contain:

1. Cross-references to other index entries.

2. Listings for synonyms of the thing you're looking for.

3. Sub-entries under the primary thing, like:

  Y Combinator, page 85
    founded by, page 99
Indexes are conceptual and semantic, they're curated.

Full-text search is typographical, it finds string literals (if you're lucky, regexes). But common terms or strings which appear frequently as substrings of larger words will trip you up (again: regexes can handle word-boundary search).

But trying to find a concept, such as the C, B, D, S or R programming languages, the X Window System, the band The The, or Alex Jones, journalist, vs. Alex Jones, batshit crazy conspiracy fraudster, won't be well servee you by FTS. An index will reveal those.

The distinction has some similarities to how Web search these days tends to expand search terms entered to attempt to interpret meaning rather than literal text. At Web scale, that's sometimes useful, often not. Within a single book where context is far more likely to be constrained, and the search space a few billion times smaller, the approach is much more useful.

Another thing an index offers is the ability to turn to it and get a conceptual overview of a book independent of the table of contents. At times when there are combatting ideas or authorities, it's helpful to be able to open a book, flip to the back, and see if it mentions some concept at all, as well as to see, at a glance, if it's a very brief mention (a single page), an extended discussion (several pages), or repeated occurrences throughout the work (numerous sections and references). (Mortimer Adler's How to Read a Book specifically recommends doing this as part of an initial assessment of a work.)

An index will also break down complex topics by listing out subdivisions, say, "policy", with breakdowns of military, foreign, domestic, energy, trade, crime, justice, civil rights, etc., etc.

I'm also a fan of FTS, and it can be exceptionally useful. But it is not a total replacement for well-constructed, thoughtful indices.

An index is a curation of content. If done well it saves you the time that you would otherwise spend trying to craft exactly the right search expression to find what you're looking for from a full-text search.

    Ctrl+f "operator precedence"
    17 results
This has happened to me too many times. A good index will have an "Operators" section a click away.
Indices group pages by more abstract concepts