如何使用mongoDB搜索索引?

发布于 2025-02-04 11:56:58 字数 614 浏览 2 评论 0原文

我目前正在学习使用节点JS,Express JS,MongoDB和Pug构建网站。我跟随 mozilla tutorial 基本原理,现在我想添加一个搜索栏。

我想从MongoDB搜索功能中获利,但是3-4天后,我仍在篮子案中。

谁能解释应该如何完成?该代码完全如教程/示例网站所述。

另外,我真的不明白整个事情是如何工作的,是否可以更轻松地添加功能或“获得”更好的方法?调试器是我从未见过的变量的海洋,对示例的丝毫改动使整个事情都沉没了。我在里面哭。任何帮助或资源都非常受欢迎。

这是指向公共回购的链接(因为它是博客文章的很多代码)。

public github存储库

I am currently learning to build websites using Node JS, Express JS, MongoDB and PUG. I followed the Mozilla tutorial to understand the fundamentals and now I want to add a search bar.

I would like to profit from MongoDB search functionalities, but after 3-4 days, I am still at basket case.

Can anyone explain how it is supposed to be done? The code is exactly as described in the tutorial/example website.

Also, I really don't understand how this whole thing works, are there easier features to add or ways to 'get it' better? The debugger is an ocean of variables as I have never seen, and the slightest alterations to the example makes the whole thing sink. I am crying inside. Any help or resource is very welcomed.

Here is a link to a public repo (since it's a lot of code for a blog post).

Public GitHub Repository

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文