Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/typesense/typesense-mongodb
A Node.js CLI to sync documents from a MongoDB collection to Typesense.
https://github.com/typesense/typesense-mongodb
mongodb typesense
Last synced: 7 days ago
JSON representation
A Node.js CLI to sync documents from a MongoDB collection to Typesense.
- Host: GitHub
- URL: https://github.com/typesense/typesense-mongodb
- Owner: typesense
- License: apache-2.0
- Created: 2021-06-05T04:02:50.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-08-16T09:39:18.000Z (over 3 years ago)
- Last Synced: 2024-05-01T09:38:47.131Z (7 months ago)
- Topics: mongodb, typesense
- Language: TypeScript
- Homepage: https://typesense.org/docs/0.21.0/guide/mongodb-full-text-search.html
- Size: 1.72 MB
- Stars: 27
- Watchers: 5
- Forks: 4
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Typesense MongoDB Integration
![CircleCI](https://img.shields.io/circleci/build/github/typesense/typesense-mongodb/master)A CLI to sync documents from a MongoDB collection to Typesense.
## Installation
```bash
npm install -g typesense-mongodb
```
## Usage### Prerequisites
- Make sure you are running MongoDB instance in a replica set. Or convert your [standalone MongoDB instance to MongoDB replica set](https://docs.mongodb.com/manual/tutorial/convert-standalone-to-replica-set/).
- We highly recommend that you stop writes to your MongoDB collection until you get a message from the process.
- If you are familiar with Typesense, it has an option to mark certain fields as **facets**. If you would like to use this feature, create your own Typesense collection and pass the collection name as an argument.### Example
```bash
typesense-mongodb \
--mongo-collection=collection \
--mongo-database=database \
--typesense-collection=collection \
--mongo-url=mongodb://localhost:27017 \
--typesense-url=http://localhost:8108 \
--typesense-api-key=xyz
```### Arguments
| Parameter | Default | Description |
| :--- | :--- |:--- |
| `--mongo-database` | database | MongoDB database name |
| `--mongo-collection` | collection | MongoDB collection name |
| `--mongo-url` | mongodb://localhost:27017 | MongoDB instance URI along with username and passsword |
| `--typesense-collection` | collection | Typesense collection name |
| `--typesense-url` | http://localhost:8108 | Typesense endpoint URL |
| `--typesense-api-key` | xyz | Typesense API key |## Support
Please open a Github issue or join our [Slack Community](https://join.slack.com/t/typesense-community/shared_invite/zt-mx4nbsbn-AuOL89O7iBtvkz136egSJg)