Mongoose plugin to automatically index newly created documents for Algolia.
NOTE: This project is in BETA. It is not properly ready for production use yet. The API is subject to change as we get closer to releasing the stable version (1.0.0).
npm install mongoose-algolia-index --save
const mongoose = require('mongoose');
const algoliaPlugin = require('mongoose-algolia-index');
let TestSchema = new mongoose.Schema({
name: String
});
TestSchema.plugin(algoliaPlugin, {
index: true,
schemaName: 'Test',
applicationId: '<your-application-id>',
apiKey: '<your-api-key>'
});
mongoose.model('Test', TestSchema);
Read the documentation in DOCUMENTATION.
Read the CONTRIBUTING guide for information.
Licensed under MIT. See LICENSE for more information.
Report a bug in issues.
Made with love in Dhaka, Bangladesh by Riyadh Al Nur