Skip to content

Commit

Permalink
Constrain CQP subqueries to span match
Browse files Browse the repository at this point in the history
  • Loading branch information
arildm committed Jan 25, 2024
1 parent 4863377 commit 09aba28
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [9.5.1-dev]

### Fixed

- Use `<match>` to constraint CQP subqueries (from statistics rows etc)

## [9.5.0] - 2023-01-22

### Added
Expand Down
2 changes: 1 addition & 1 deletion app/config/statistics_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ let getCqp = function (hitValues, ignoreCase) {
}
tokens.push("[" + andExpr.join(" & ") + "]")
}
return tokens.join(" ")
return `<match> ${tokens.join(" ")} []* </match>`
}

let reduceCqp = function (type, tokens, ignoreCase) {
Expand Down

0 comments on commit 09aba28

Please sign in to comment.