mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-11-03 18:53:17 -05: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:
		@@ -13,7 +13,8 @@ export const useRecipeSearch = (recipes: Ref<Recipe[] | null>) => {
 | 
				
			|||||||
      findAllMatches: true,
 | 
					      findAllMatches: true,
 | 
				
			||||||
      maxPatternLength: 32,
 | 
					      maxPatternLength: 32,
 | 
				
			||||||
      minMatchCharLength: 2,
 | 
					      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,
 | 
					        findAllMatches: true,
 | 
				
			||||||
        maxPatternLength: 32,
 | 
					        maxPatternLength: 32,
 | 
				
			||||||
        minMatchCharLength: 2,
 | 
					        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