Hi. I have a nodeJS web application. There are different “webpages” such as domain.com/about, domain.com/about, domain.com/events, how would I save all the text from all the web pages to a database and search it up when a user inputs a keyword? Basically a search function like https://www.hackingwithswift.com/search/swiftui ?
Welcome to MongoDB community!
MongoDB allows verious ways to search documents and we recommend segregating entities that would need to be fetched together in embedded documents.
For searches you can index “tags” arrays and search in any of the keywords
The server have different indexes like geo and text search.
However, the best full text search experience is provided via our Atlas Search product when you host your database in Atlas.