improvement(search): steer Confluence native queries to siteSearch for topic lookups

Merged
WA
4d ago
+3-3

Summary

  • The Confluence native-query guide taught only text ~ / title ~, so assistants searching Confluence directly wrote ORed text ~ clauses. CQL returns those in no relevance order, which puts pages sharing one common word (e.g. an acronym mentioned in passing) ahead of the page about the topic.
  • The guide now leads with siteSearch ~, Confluence's relevance search, for topic, acronym and how-to lookups, and keeps text ~ / title ~ for exact strings. The example and the avoid line follow.
  • Plain (non-native) searches already fall back to siteSearch on overflow; native queries skip that fallback, so the guide is the only lever on that path.

Type of Change

  • Improvement

Testing

  • Blind A/B on 40 real assistant-written Confluence queries: each ran as written (ORed text ~ / title ~) and rewritten as one siteSearch over the same words; a model judge compared the top 5 for the user's question in both orders, counting a win only when both orders agreed. siteSearch won 21, text ~ won 1, 18 ties (34/40 order-consistent). text ~ returned nothing in 4 cases where siteSearch returned 5. The one loss was an exact identifier lookup, which the guide still routes to text ~.
  • Side by side on six real topic questions, type IN (page, blogpost) AND siteSearch ~ "<words>" put the page about the topic first in five; the ORed text ~ form led with pages that only mention a term. One was mixed (a short token fuzzy-matched a longer one).
  • Native siteSearch queries run through the existing native-CQL path unchanged (scope, pagination, page mapping).
  • vitest on providers.test.ts, application.test.ts, atlassian.test.ts: 117 passed. biome check on the changed file.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)