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:
1 parent
28d24875a3
commit
0acc260447
2 files changed
+4
-2
No files matched your search
@@ -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"],
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -186,7 +186,8 @@ export default defineComponent({
|
||||
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"],
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user