1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-08-02 20:15:24 +02:00

Improve the default search by focussing on title and description (#2053)

* ignore field norm + weights for basic search

* better search config for advanced search

* undo (wrong) automatic formatting
This commit is contained in:
RealFoxie 2023-01-29 02:07:49 +01:00 committed by GitHub
parent 28d24875a3
commit 0acc260447
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -13,7 +13,8 @@ export const useRecipeSearch = (recipes: Ref<Recipe[] | null>) => {
findAllMatches: true,
maxPatternLength: 32,
minMatchCharLength: 2,
keys: ["name", "description", "recipeIngredient.note", "recipeIngredient.food.name"],
ignoreFieldNorm: true,
keys: [{ name: "name", weight: 1.3 }, { name: "description", weight: 1.2 }, "recipeIngredient.note", "recipeIngredient.food.name"],
},
});