aquasecurity / aquasecurity/esquery

FEATURE request. Missing boost support inside Match statement.

Open
#20 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Go
Stars
317
Forks
58
PR merge metrics
No merged PRs in 30d

Description

At the moment there is no simple way to add boost directly into match statement. for example: `
{
"match": {
"name": {
"boost": 30.0,
"query": "Alex"
}
}
}
`

the only way to have boost for match statement is huge overhead: `
{
"bool": {
"boost": 30,
"must": [
{
"match": {
"name": {
"query": "Alex"
}
}
}
]
}
}
`

I propose to provide Boost method inside match statement to omit overcomplicating of queries.
Solution is to add `boost` field to `matchParams` struct, Boost method for it and testCase to
ensure that everything is mapped as expected.

Contributor guide

Open the contributing guide

Research direction

Locate the matchParams struct and its existing parameter methods, then inspect the match query testCase mentioned in the issue. Confirm how fields are mapped in the generated query and verify that a match query with boost produces the requested JSON while existing match behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
search
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.