Skip to content

Commit

Permalink
feat(elastic-search): improved default search
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnvdbrug committed Dec 20, 2024
1 parent 07e74f7 commit 190b592
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,6 @@
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jsdoc": "^45.0.0",
"eslint-plugin-prefer-arrow": "^1.2.3"
}
},
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
1 change: 1 addition & 0 deletions packages/elasticsearch-plugin/src/build-elastic-body.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export function buildElasticBody(
{
multi_match: {
query: term,
fuzziness: "AUTO",
type: searchConfig.multiMatchType,
fields: [
`productName^${searchConfig.boostFields.productName}`,
Expand Down
4 changes: 2 additions & 2 deletions packages/elasticsearch-plugin/src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -728,8 +728,8 @@ export const defaultOptions: ElasticsearchRuntimeOptions = {
totalItemsMaxSize: 10000,
multiMatchType: 'best_fields',
boostFields: {
productName: 1,
productVariantName: 1,
productName: 5,
productVariantName: 5,
description: 1,
sku: 1,
},
Expand Down

0 comments on commit 190b592

Please sign in to comment.