Skip to content

Commit

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

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

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

0 comments on commit a2677df

Please sign in to comment.