Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
abeglova committed Jun 30, 2023
1 parent 6d16c88 commit bad7e79
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -389,14 +389,16 @@ export const buildLearnQuery = (
buildSuggestQuery(text, LEARN_SUGGEST_FIELDS)
)

builder = builder.query("function_score", {
boost_mode: "replace",
script_score: {
script: {
source: "Math.round(_score*2)"
}
},
...orSubqueriesBuilder.build()
builder = builder.rawOption("query", {
function_score: {
boost_mode: "replace",
script_score: {
script: {
source: "Math.round(_score*2)"
}
},
query: orSubqueriesBuilder.build()
}
})

builder = builder.rawOption("sort", [
Expand Down

0 comments on commit bad7e79

Please sign in to comment.