0.2.7 • Published 5 months ago

feathers-solr-node v0.2.7

Weekly downloads
32
License
MIT
Repository
github
Last release
5 months ago

feathers-solr-node

Solr Adapter for Feathersjs. Build on Solr-Client Adapter, so can also used as a Solr-client. see here

Installation

npm install feathers-solr-node --save

Complete Example

const feathers = require("feathers");
const rest = require("feathers-rest");
const hooks = require("feathers-hooks");
const bodyParser = require("body-parser");
const errorHandler = require("feathers-errors/handler");
const solr = require("feathers-solr-node");
const express = require("@feathersjs/express");
const logger = require("winston");

const Service = new solr.Service({
  host: "127.0.0.1", // your solr host
  port: 8086,
  core: "gettingstarted", // core name or collection name
  username: "solr_user", // optional
  password: "solr_password", // optional
  primaryKey: 'id',
  paginate: {
    default: 10,
    max: 100
  }
});

const app = feathers()
  .configure(rest())
  .configure(hooks())
  .use(bodyParser.json())
  .use(bodyParser.urlencoded({ extended: true }))
  .use("/solr", Service)
  .use(
    express.errorHandler({
      html: false,
      logger,
      json: (err, req, res, next) => {
        res.json({
          error: {
            message: err.message,
            code: err.code
          }
        });
      }
    })
  );

app.listen(3030);

console.log("Feathers app started on 127.0.0.1:3030");

Support all Feathers Queries

See Feathers querying for more detail

Supported Solr Queries

$search

Simple query

query: {
  $search: '"I love Vietnam" OR "I love you"'
}
0.2.7

5 months ago

0.2.6

3 years ago

0.2.5

4 years ago

0.2.4

5 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago