Итак, я пытаюсь найти нечеткий поиск по полю в документе mongodb.Если у меня есть 6 ключевых слов, которые я ищу, скажем, например,
['red', 'crisp', 'sweet', 'crunchy', 'pie', 'durable'] и я ищуполе с описанием сорта яблок. Я хочу вернуть все яблоки, у которых есть 4 из 6 ключевых слов, которые я ищу.Как бы вы достигли этого, используя MongoDB?
Вот два примера документа только для справки
{
name: "Golden Delicious",
description: "Golden Delicious is a large, yellowish-green skinned cultivar and very sweet to the taste. It is prone to bruising and shriveling, so it needs careful handling and storage. It is a favorite for salads, apple sauce, and apple butter."
}
{
name: "Jonagold",
description: "Jonagold is a cultivar of apple which was developed in 1953 in New York State Agricultural Experiment Station of Cornell University's College of Agriculture and Life Sciences, a cross between the crisp Golden Delicious and the blush-crimson Jonathan. They form a large sweet fruit with a thin skin. "
}