项目作者: paginagmbh

项目描述 :
ECMAScript Client for Apache Solr
高级语言: CoffeeScript
项目地址: git://github.com/paginagmbh/solr-client.git
创建时间: 2018-07-12T13:53:26Z
项目社区:https://github.com/paginagmbh/solr-client

开源协议:BSD 2-Clause "Simplified" License

下载


ECMAScript Client for Apache Solr

API

This library provides two entry points, one for querying and one for loading data into a solr core.

solr-client

  1. const solr = require("solr-client");
  2. const index = solr({url: "URL to the Solr instance that I want to address..."});
  3. const core = index("Name of the core that I want to address");
  4. let results = core.select{ queryOptions }

The queryOptions parameter is expecting a ECMAScript object with keys corresponding to the parameters that your Solr query parser understands, e.g.

  1. let queryOptions = {
  2. q: "Tübingen",
  3. df: "full_text",
  4. start: 0,
  5. rows: 10
  6. }

The select function returns an object with the keys responseHeader and response.

solr-loader

solr-loader is a tool intended for command line usage. It can be called with the following parameters:

The basic call syntax is

  1. solr-loader URL SOURCEGLOB

A number of optional parameters can be used:

  1. solr-loader --clear --batch 50 --core CORENAME --swap SWAPCORENAME --schema JSONSCHEMA --encoding ENCODING --optimize URL SOURCEGLOB

If a swap parameter is given, data is first loaded into the core and once all data is processed, the core and swapcore are swapped. The default encoding is “utf-8”, the default batch size 1.

License

BSD

Author Information

This library was created in 2018 by Pagina GmbH.