Я очень новичок в пн go (ранее также не знал о структуре БД) и в среде Python. Мое требование - создать рецепт БД. Как только будут добавлены данные, я смогу получить рецепты с ингредиентами.
Поиск предметов аналогичен ингредиенту monog db,
Пример
Рецепт - 1. Куриное карри - (курица, лук, помидоры, масло), текст для подготовки 2. Курица Ролл - (курица, лук, пшеничная мука, масло), текст для подготовки 3. Paneer Ролл - (панир, лук, пшеничная мука, масло), текст для подготовки 4. Paneer Sandwich - (панир, лук, хлеб, масло), текст для подготовки
Так что в моем вызове API какой запрос должен быть для получения рецептов по ингредиентам. Пример: 1. query - Paneer: Result recipes: Paneer Roll, Paneer Sandwich 2. query - Paneer, лук, хлеб: Paneer Sandwich 3. query - Цыпленок, помидоры: Куриное карри
Должен возвращать соответствующие рецепты. Пожалуйста, помогите с этим. Пожалуйста, дайте мне знать, если есть какая-либо другая база данных, подходящая для этого требования.
{
"category": "Indian",
"recipe_url": "https://www.allrecipes.com/recipe/222667/dal-makhani-indian-lentils/",
"recipe_name": "dal makhani (indian lentils)",
"recipe_short_description": "\"ever go to an indian restaurant and wonder how they make those lentils? i hated lentils before i discovered indian food then i scoured the internet to figure out how they achieved them and through mixing and matching recipes and methods on videos ive arrived at this recipe which i think is pretty close this version is very rich but you can leave out the cream to make it lighter kasuri methi (fenugreek leaves) is almost impossible to find in the us even in nyc but it gives this dish something very special\"",
"image": [
{
"url": " \"https://images.media-allrecipes.com/userphotos/560x315/1257894.jpg\""
}
],
"recipe_calories": "390 cals",
"recipe_preptime": "4 h 15 m",
"recipe_servings": "\"6\"",
"recipe_ingredient": [
{
"ingredient_desc": "1 cup lentils",
"amount": "1 ",
"ingr": "cup lentils",
"content": "lentils"
},
{
"ingredient_desc": "1/4 cup dry kidney beans (optional)",
"amount": "1/4 ",
"ingr": "cup kidney beans",
"content": "beans"
},
{
"ingredient_desc": "water to cover",
"amount": "",
"ingr": "water",
"content": "water cover"
},
{
"ingredient_desc": "5 cups water",
"amount": "5 ",
"ingr": "cups water",
"content": "water"
},
{
"ingredient_desc": "salt to taste",
"amount": "",
"ingr": "salt taste",
"content": "taste"
},
{
"ingredient_desc": "2 tablespoons vegetable oil",
"amount": "2 ",
"ingr": "vegetable oil",
"content": "oil"
},
{
"ingredient_desc": "1 1/2 tablespoons ginger paste",
"amount": "1/2 ",
"ingr": "ginger paste",
"content": "paste"
},
{
"ingredient_desc": "1 1/2 tablespoons garlic paste",
"amount": "1/2 ",
"ingr": "paste",
"content": "paste"
},
{
"ingredient_desc": "1/2 teaspoon ground turmeric",
"amount": "1/2 teaspoon",
"ingr": "ground",
"content": "turmeric"
},
{
"ingredient_desc": "1 pinch cayenne pepper or more to taste",
"amount": "1 ",
"ingr": "pinch cayenne pepper",
"content": "pepper taste"
},
{
"ingredient_desc": "1 cup canned tomato puree or more to taste",
"amount": "1 ",
"ingr": "cup tomato puree",
"content": "canned puree taste"
},
{
"ingredient_desc": "1 tablespoon chili powder",
"amount": "1 ",
"ingr": "chili powder",
"content": "powder"
},
{
"ingredient_desc": "add all ingredients to list",
"amount": "",
"ingr": "",
"content": ""
}
],
"recipe_description": "\"ever go to an indian restaurant and wonder how they make those lentils? i hated lentils before i discovered indian food then i scoured the internet to figure out how they achieved them and through mixing and matching recipes and methods on videos ive arrived at this recipe which i think is pretty close this version is very rich but you can leave out the cream to make it lighter kasuri methi (fenugreek leaves) is almost impossible to find in the us even in nyc but it gives this dish something very special\"",
"recipe_procedure": [
{
"step": "0",
"desc": "place lentils and kidney beans in a large bowl; cover with plenty of water soak for at least 2 hours or overnight drain"
},
{
"step": "1",
"desc": "cook lentils kidney beans 5 cups water and salt in a pot over medium heat until tender stirring occasionally about 1 hour remove from heat and set aside keep the lentils kidney beans and any excess cooking water in the pot"
},
{
"step": "2",
"desc": "heat vegetable oil in a saucepan over medium-high heat cook cumin seeds in the hot oil until they begin to pop 1 to 2 minutes add cardamom pods cinnamon stick bay leaves and cloves; cook until bay leaves turn brown about 1 minute reduce heat to medium-low; add ginger paste garlic paste turmeric and cayenne pepper stir to coat"
},
{
"step": "3",
"desc": "stir tomato puree into spice mixture; cook over medium heat until slightly reduced about 5 minutes add chili powder coriander and butter; cook and stir until butter is melted"
},
{
"step": "4",
"desc": "stir lentils kidney beans and any leftover cooking water into tomato mixture; bring to a boil reduce heat to low stir fenugreek into lentil mixture cover saucepan and simmer until heated through stirring occasionally about 45 minutes add cream and cook until heated through 2 to 4 minutes"
}
],
"recipe_nutrition": "per serving: 390 calories; 215 g fat; 371 g carbohydrates; 132 g protein; 48 mg cholesterol; 420 mg sodium full nutrition",
"_id":
Вот пример кода рецепта в пн go дБ. И, пожалуйста, дайте мне знать, если это правильный способ положить ингредиенты в пн go. и если это какой способ получить предметы, похожие на это. Пожалуйста, помогите