Skip to content

Commit

Permalink
Fix wrong order of params (#643)
Browse files Browse the repository at this point in the history
  • Loading branch information
valstu authored Feb 21, 2024
1 parent 8377849 commit 24d98c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/orama/src/methods/search-fulltext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export async function fullTextSearch<T extends AnyOrama, ResultDocument = TypedD
await runBeforeSearch(orama.beforeSearch, orama, params, language)
}

params.relevance = Object.assign(params.relevance ?? {}, defaultBM25Params)
params.relevance = Object.assign(defaultBM25Params, params.relevance ?? {})

const vectorProperties = Object.keys(orama.data.index.vectorIndexes)

Expand Down
2 changes: 1 addition & 1 deletion packages/orama/src/methods/search-hybrid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ async function getFullTextSearchIDs<T extends AnyOrama, ResultDocument = TypedDo
language?: string
): Promise<TokenScore[]> {
const timeStart = await getNanosecondsTime()
params.relevance = Object.assign(params.relevance ?? {}, defaultBM25Params)
params.relevance = Object.assign(defaultBM25Params, params.relevance ?? {})

const { term, properties, threshold = 1 } = params

Expand Down

0 comments on commit 24d98c7

Please sign in to comment.