Escape a string for a lucene query. Effectively removes all special characters.
npm install lucene-escape-queryEscape a string for a lucene query. Effectively removes all special characters.
Table of Contents generated with DocToc
- Install
- Usage
- Methods
- escape (
- Tests
- Developing
- Requirements
- License
``sh`
npm i -S lucene-escape-query
`js
var luceneEscapeQuery = require('lucene-escape-query')
luceneEscapeQuery.escape('+Rainbow') // \+Rainbow
`
* npm test will run both server and browser testsnpm run test-browser
* and npm run test-server run their respective testsnpm run tdd
* will run the server tests on every file change.
_NOTE: you might need to
sudo ln -s /usr/local/bin/node /usr/bin/node to ensure node is in your path for the git hooks to work_$3
* npm > 2.0.0 So that passing args to a npm script will work. npm i -g npm
* git > 1.8.3 So that git push --follow-tags will work. brew install git`Artistic 2.0 © Joey Baker
[npm-url]: https://npmjs.org/package/lucene-escape-query
[npm-image]: https://badge.fury.io/js/lucene-escape-query.svg
[travis-url]: https://travis-ci.org/joeybaker/lucene-escape-query
[travis-image]: https://travis-ci.org/joeybaker/lucene-escape-query.svg?branch=master
[daviddm-url]: https://david-dm.org/joeybaker/lucene-escape-query.svg?theme=shields.io
[daviddm-image]: https://david-dm.org/joeybaker/lucene-escape-query