Preparing search index...
    • Adds or merges ingredients with existing ones.

      Merging behavior:

      • If ingredient doesn't exist: adds it (with its note if present)
      • If ingredient exists with same unit: merges quantities, preserves new note
      • If ingredient exists with different unit: replaces it entirely

      Note handling: When merging quantities, the new ingredient's note takes precedence. This allows scraped data to provide usage context.

      Parameters

      Returns IngredientState

      Updated ingredient state