Skip to content

improvement(search): lead an overflowing Jira all-terms match with issues whose summary holds every term - #9111

Merged
waleedlatif1 merged 1 commit into
stagingfrom
improvement/jira-summary-first
Oct 16, 2026
Merged

waleedlatif1 merged 1 commit into
stagingfrom
improvement/jira-summary-first

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Jira JQL has no relevance order: a text ~ query with more matches than fit on one page comes back newest-created first, so on a large Jira the page is whatever was filed most recently with the words anywhere (often bot tickets whose logs contain every word)
  • When a plain all-terms Jira search overflows its page, fetch the issues whose summary holds every term (summary ~) and lead the page with them, then the rest of the all-terms page (a title boost, as field boosting does in Lucene/Elasticsearch); mirrors the Confluence overflow rule from improvement(search): rank an overflowing Confluence all-terms match with relevance search #9001
  • When no summary holds every term of a query with three or more terms, issues whose summary holds at least half of them lead instead (the same minimum-should-match rule the any-term Jira filter uses); both summary searches run in parallel
  • Never fires on a match that fits on one page, on native JQL, date order, or any-term matches; no summary hits or a failed summary search keep today's page and cursor; cancellation propagates

Type of Change

  • Improvement

Testing

  • atlassian.test.ts: 10 new cases (summary-first page, half-the-terms fallback, two-term queries kept to every term, no summary hits, refusal/timeout fallback, cancellation, one-page match, date/native/any-term untouched); each guard reverted and its test went red
  • Offline replay on a large production Jira (read-only), 60 distinct plain queries from real client sessions, blind relevance judge labelling the pooled issues: 23 overflow a page; the rule changes 14 (5 all-terms, 9 half-terms); 9 better, 5 equal, 0 worse; relevant issues in the top 10 36 → 75
  • Small Jira sites never overflow, so they see no extra request; on a large site the summary searches add one parallel round of Jira requests (~0.5 s)

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)

@vercel

vercel Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Oct 16, 2026 4:58am UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with a non-blocking gap in the promised half-term title boost.

Findings

  1. P2 Half-term title boost is missing ▶

Summary

Adds a summary-first page for overflowing plain Jira searches.

  • Overflowing plain Jira searches put summary matches first.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Fetch all-terms page] --> B{Eligible overflowing search?}
  B -->|No| C[Return original page]
  B -->|Yes| D[Search summaries for every term]
  D -->|Hits| E[Lead with summary hits and remove cursor]
  D -->|No hits or request fails| C
  D -->|Caller cancels| F[Stop search]
Loading

Reviews (2) · Last reviewed commit: "improvement(search): lead an overflowing..." · Reviewed by Greptile

@waleedlatif1
waleedlatif1 merged commit 0e0de65 into staging Oct 16, 2026
53 checks passed
@waleedlatif1
waleedlatif1 deleted the improvement/jira-summary-first branch October 16, 2026 05:20
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

if (!text || input.native || order || input.textMatch === 'any' || !exact.next) return exact
try {
const titled = await searchIssues(jiraSummaryClause(text))
if (!titled.documents.length) return exact

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Half-term title boost is missing

For queries with three or more terms, an empty summary search returns exact immediately. The PR description promises that issues whose summary holds at least half the terms should lead in this case, but this branch only tries the every-term search. Users still get the original newest-first page.

Add the half-term summary fallback while preserving the original all-terms requirement.

waleedlatif1 added a commit that referenced this pull request Oct 16, 2026
* revert(search): restore the v0.9.23 Jira text search

Reverts the Jira summary tiers (#9111, #9115, #9121, #9129). A plain Jira search
again returns the all-terms text match in Jira's order, as in v0.9.23. The
stemmedTerms helper stays; cross-source ranking uses it.

* chore(search): stop exporting stemmedTerms now only text-match uses it

This branch was previously deployed

1 inactive deployment
Preview — 58137cd7 Deployed Oct 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant