Skip to content

Commit

Permalink
chore: Simplify trend subquery CQP
Browse files Browse the repository at this point in the history
  • Loading branch information
arildm committed May 16, 2024
1 parent 2caf166 commit 2969133
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/scripts/trend_diagram/trend_util.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ export function getTimeCQP(time, zoom, coarseGranularity) {
timecqp = `[(${startsSameDate} & ${timeInside}) | (${startsBefore} & ${endsAfter})]`
}

timecqp = `<match> ${timecqp} []{0,} </match>`
// In case the main query matches multiple tokens, this subquery must only match the first token in the main match.
timecqp = `<match> ${timecqp}`
return timecqp
}

Expand Down

0 comments on commit 2969133

Please sign in to comment.