Book Image

Build Applications with Meteor

Book Image

Build Applications with Meteor

Overview of this book

This book starts with the basic installation and overview of the main components in Meteor. You’ll get hands-on multiple versatile applications covering a wide range of topics from adding a front-end views with the hottest rendering technology React to implementing a microservices oriented architecture.All the code is written with ES6/7 which is the latest significantly improved JavaScript language. We’ll also look at real-time data streaming, server to server data exchange, responsive styles on the front-end, full-text search functionality, and integration of many third-party libraries and APIs using npm. By the end of the book, you’ll have the skills to quickly prototype and even launch your next app idea in a matter of days.
Table of Contents (16 chapters)
Title Page
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
8
Build a Chatbot with Facebook’s Messenger Platform

Chapter 6. Building a Real-Time Search Application

In this chapter, we will explore the full-text search functionality of MongoDB by developing a simple search application with the main stack that we've been using for the past few chapters:  Meteor, React, and Redux, adding a few new libraries along the way. We'll start by importing sample data to the MongoDB collection, then we will create an index on some of the fields and perform search queries directly from the sample data which can be found in the official MongoDB documentation at https://docs.mongodb.com/getting-started/shell/import-data/.

The direct link to the data is https://raw.githubusercontent.com/mongodb/docs-assets/primer-dataset/primer-dataset.json. The dataset contains over 25,000 documents of restaurants in the New York City area, which is a perfect dataset for what we will build. If you click on the preceding link, you would probably notice that the data contains the coord field (latitude and longitude). We will use this...