Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maxnowack/meili-sync
Connector to sync mongodb documents into meilisearch
https://github.com/maxnowack/meili-sync
Last synced: 25 days ago
JSON representation
Connector to sync mongodb documents into meilisearch
- Host: GitHub
- URL: https://github.com/maxnowack/meili-sync
- Owner: maxnowack
- License: mit
- Created: 2020-07-26T15:22:55.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T20:30:49.000Z (almost 2 years ago)
- Last Synced: 2024-10-03T08:48:52.923Z (about 1 month ago)
- Language: TypeScript
- Size: 724 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# meili-sync
Connector to sync mongodb documents into meilisearch## installation
````bash
$ npm install -g meili-sync
````## usage
````bash
meili-sync
````### docker
````bash
docker pull maxnowack/meili-sync
docker run -v /path/to/config.yaml:/config.yaml maxnowack/meili-sync
````## configuration
````yaml
mongo:
url: mongodb://localhost:27017/test # mongodb connection uri
options: # connection options (see https://mongodb.github.io/node-mongodb-native/3.6/reference/connecting/connection-settings/)
useNewUrlParser: true
useUnifiedTopology: true
meili: # these options are directly passed through to the meilisearch client
host: http://localhost:7700
apiKey: 'abc123'
sync:
- indexName: videos # name of the meilisearch index. the index will be created automatically if it doesn't exist
collectionName: videos # name of the mongodb collection
selector: # mongodb query for selecting the documents for syncing
deleted: false
disabled: false
fields: # field mapping
title: # name of the field in the meilisearch index
mongoField: title # path to the value of the field in the mongodb document (uses lodash.get; see https://lodash.com/docs/4.17.15#get)
categories:
mongoField: categories._id # array fields are resolved to all values automatically
duration:
mongoField: duration
publishDate:
mongoField: publishDate
rating:
mongoField: rating
ratings:
mongoField: ratings
slug:
mongoField: slug
tags:
mongoField: tags
views:
mongoField: views
````## license
Licensed under MIT license. Copyright (c) 2020 Max Nowack## contributions
Contributions are welcome. Please open issues and/or file Pull Requests.