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 31, 2024
1 parent 44efe09 commit c531656
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- Unnecessary scrollbars in the corpus selector info panel [#333](https://github.com/spraakbanken/korp-frontend/issues/333)
- Bug with undefined `arguments`
- On repetition error (all tokens repeat from 0), restore red outline for input
- Use `<match>` to constraint CQP subqueries (from statistics rows etc)

## [9.5.0] - 2023-01-22

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 c531656

Please sign in to comment.