Preparing search index...
    • Processes ingredients for validation by filtering exact database matches.

      Returns exact matches (preserving scraped quantity/unit/note) and items that need validation separately. Exact matches combine database metadata with scraped recipe-specific data. Items needing validation include their pre-computed similar items, sorted so items WITHOUT similar matches come first.

      Note: Ingredient names should already be cleaned (parenthetical content removed) by parseIngredientString in RecipeScraperConverter before reaching this function.

      Parameters

      • ingredients: Partial<ingredientTableElement>[]

        Array of ingredients to process (can be partial for scraped data)

      • findSimilarIngredients: (name: string) => ingredientTableElement[]

        Function to find similar ingredients in database

      Returns {
          exactMatches: ingredientTableElement[];
          needsValidation: IngredientWithSimilarity[];
      }

      Object with exactMatches (with preserved notes) and needsValidation arrays (with similarity info)