Skip to content

algolia-samples/algolia-mongodb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Algolia MongoDB Listings Application

This repository contains the local files for the sample Algolia MongoDB Listings Application that is implemented as part of a blogpost series located here.

Features

Algolia Index loading

To try the loading of the Algolia index based on the sample dataset, you need an Algolia API key, which you can obtain by:

  1. Registering for a free Algolia account, or Logging in to your existing account
  2. After signing in, an Algolia Application will automatically be created for you. You can either use the default (unnamed) application, or create a new application
  3. Go to your API Keys section of your application and retrieve your Application ID and Admin API Key You will need to use both the Application ID and Admin API Key in when connecting your Algolia account from the Python code below

Open either the:

  • publicly hosted Notebook on Google collab
  • local Jupyter Notebook
  • local Python script They are all responsible for loading the Algolia index. Change the algolia_app_id and the algolia_admin_key variables to your API keys and run the script.

The script will:

  1. Connect to Algolia using the Algolia Python API and validate the connection
  2. Connect to a running MongoDB instance and retrieve sample data
  3. Prepare the Algolia index
  4. Load the dataset into Algolia from the MongoDB instance and replace the existing index

Testing the demo application

You can also easily try out the Search Web Application by either:

  • opening the StackBlitz hosted version of the application on the cloud. This contains both the source and the created application and allows you to make modifications and see the changes real-time.
  • opening the local files for the web application. You will need to have NodeJS on your machine and run npm install and npm start from the search-web-application directory to run the app.