Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wmfs/tymly-solr-plugin
https://github.com/wmfs/tymly-solr-plugin
plugin solr tymly
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/wmfs/tymly-solr-plugin
- Owner: wmfs
- License: mit
- Created: 2018-06-12T13:58:33.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-09-27T21:56:39.000Z (4 months ago)
- Last Synced: 2024-10-13T17:36:22.820Z (4 months ago)
- Topics: plugin, solr, tymly
- Language: JavaScript
- Size: 1.29 MB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# tymly-solr-plugin
[![Tymly Package](https://img.shields.io/badge/tymly-package-blue.svg)](https://tymly.io/)
[![npm (scoped)](https://img.shields.io/npm/v/@wmfs/tymly-solr-plugin.svg)](https://www.npmjs.com/package/@wmfs/tymly-solr-plugin)
[![CircleCI](https://circleci.com/gh/wmfs/tymly-solr-plugin.svg?style=svg)](https://circleci.com/gh/wmfs/tymly-solr-plugin)
[![codecov](https://codecov.io/gh/wmfs/tymly-solr-plugin/branch/master/graph/badge.svg)](https://codecov.io/gh/wmfs/tymly-solr-plugin)
[![CodeFactor](https://www.codefactor.io/repository/github/wmfs/tymly-solr-plugin/badge)](https://www.codefactor.io/repository/github/wmfs/tymly-solr-plugin)
[![Dependabot badge](https://img.shields.io/badge/Dependabot-active-brightgreen.svg)](https://dependabot.com/)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/wmfs/tymly-solr-plugin/blob/master/LICENSE)> This plugin handles interaction with Apache Solr.
On tymly startup, this plugin searches the loaded blueprints for models that have properties which should be indexed by Apache Solr. It then creates a database view referencing those properties. This service also provides functions to instruct Apache Solr to index data from a database table/view.
See the test blueprint in /test/fixtures/school-blueprint for an example of how to do this.
## Install
```bash
$ npm install tymly-solr-plugin --save
```Before running the tests, you'll need a test PostgreSQL database available and set a `PG_CONNECTION_STRING` environment variable to point to it, for example:
```PG_CONNECTION_STRING=postgres://postgres:postgres@localhost:5432/my_test_db```
You can also set an optional `SOLR_URL` environment variable to configure what Apache Solr instance to use. If the environment variable is not set the plugin will default to `http://localhost:8983/solr`. You can however explicitly configure what instance to use like this:
```SOLR_URL=http://domain.com:8983/solr```
Once the environment variables have been set, you can run the tests like this:
```bash
$ npm test
```[MIT](https://github.com/wmfs/tymly/blob/master/LICENSE)