Exercise 2: A Compound Query Combining Phrase, AND, and OR — Possible Solution ==================================================================== THE QUERY ------------------------------ "connection refused" postgres docker OR kubernetes WHY THE PHRASE IS QUOTED ------------------------------ "connection refused" is an exact error message, not a general topic — per this chapter, quoting it forces a literal, in-order match instead of a loose match on pages that merely contain the words "connection" and "refused" somewhere unrelated to each other. Without the quotes, a page discussing an entirely different kind of refused connection (e.g. a network security context with nothing to do with postgres) could still match on the individual words alone. WHY "postgres" NEEDS NO EXPLICIT OPERATOR ------------------------------ Per this chapter's own opening section, multiple terms default to an implicit AND. Since every result should genuinely be about postgres specifically, postgres is simply typed as a plain keyword and left to the default AND behavior to require it — no special operator is needed to make a term mandatory, since mandatory is already the default. WHY "docker OR kubernetes" USES AN EXPLICIT, CAPITALIZED OR ------------------------------ The connection-refused error could plausibly come from either a Docker Compose setup or a Kubernetes deployment, and the goal is to catch either kind of result rather than assume which one applies. Per this chapter, OR must be capitalized to be recognized as the Boolean operator rather than treated as an ordinary keyword folded into the implicit AND — lowercase "or" would not have the intended broadening effect. HOW THE WHOLE QUERY RESOLVES ------------------------------ Overall the query reads as: pages containing the exact phrase "connection refused," AND containing "postgres," AND containing either "docker" or "kubernetes" — a precise search for a specific error message in a specific database's context, deliberately broadened across the two most likely deployment environments rather than guessing one and missing results from the other. WHY THIS WORKS AS AN ANSWER ------------------------------ Every operator used is directly justified by what it's meant to accomplish rather than used decoratively, correctly applies the no-operator-needed default-AND behavior to "postgres," and correctly capitalizes OR per this chapter's own explicit case-sensitivity warning.