{"_id":"lucene-queryparser","_rev":"7-6de140ce87bd29ad085ad0c2f245195b","name":"lucene-queryparser","description":"Lucene Query Parser for Javascript created using PEG.js","dist-tags":{"latest":"3.0.0"},"versions":{"1.0.0":{"name":"lucene-queryparser","version":"1.0.0","description":"Lucene Query Parser for Javascript created using PEG.js","main":"lib/lucene-queryparser.js","scripts":{"build":"PEG_OUT=`cat lib/lucene-query.grammar | node_modules/pegjs/bin/pegjs` && printf \"if (typeof define !== 'function') { var define = require('amdefine')(module) };\n\ndefine([], function() { \nvar module = {};\n%s\nreturn module.exports;\n});\n\"  \"$PEG_OUT\" > ./lib/lucene-queryparser.js","test":"jasmine-node ./spec/ --verbose","prepublish":"npm run-script build && npm test"},"repository":{"type":"git","url":"git://github.com/xomyaq/lucene-queryparser.git"},"keywords":["lucene","query","parser","pegjs"],"author":{"name":"Troy Howard","email":"thoward37@gmail.com","url":"http://github.com/thoward"},"contributors":[{"name":"Eugeny Vlasenko","email":"mahnunchik@gmail.com","url":"http://mahnunchik.tumblr.com/"},{"name":"Ilnur Khalilov","email":"ilnur.khalilov@gmail.com","url":"https://github.com/xomyaq"}],"license":"Apache 2.0","bugs":{"url":"https://github.com/xomyaq/lucene-queryparser/issues"},"dependencies":{"amdefine":">=0.0.2"},"devDependencies":{"pegjs":"0.7.x","jasmine-node":"1.10.x"},"gitHead":"ad09d5553368f563f0d96d7cd96a8275341df192","homepage":"https://github.com/xomyaq/lucene-queryparser#readme","_id":"lucene-queryparser@1.0.0","_shasum":"b2763ad06dad006e967af6e6de306f31fa1dfea5","_from":".","_npmVersion":"3.10.9","_nodeVersion":"7.2.1","_npmUser":{"name":"ilnur","email":"ilnur.khalilov@gmail.com"},"dist":{"shasum":"b2763ad06dad006e967af6e6de306f31fa1dfea5","tarball":"https://registry.npmjs.org/lucene-queryparser/-/lucene-queryparser-1.0.0.tgz","integrity":"sha512-FNj4pPxWBVYyXf8yhTqbfwi2My63gThEh6O7Z1u9goDV40fnN0CtcmpR5MORHDyADFkMAlEzaVVCYxoBKh6FkQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEEc+eMFS+Ejl2Itwe/YKt1d2QMRufXum5mJI/cBbx1dAiEAl+3LoVQiNsAOGzkFkWehevbMwYnXxHA4ujrk3FJKEQQ="}]},"maintainers":[{"name":"ilnur","email":"ilnur.khalilov@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/lucene-queryparser-1.0.0.tgz_1482429327661_0.461899547604844"}},"2.0.0":{"name":"lucene-queryparser","version":"2.0.0","description":"Lucene Query Parser for Javascript created using PEG.js","main":"lib/lucene-queryparser.js","scripts":{"build":"PEG_OUT=`cat lib/lucene-query.grammar | node_modules/pegjs/bin/pegjs` && printf \"if (typeof define !== 'function') { var define = require('amdefine')(module) };\n\ndefine([], function() { \nvar module = {};\n%s\nreturn module.exports;\n});\n\"  \"$PEG_OUT\" > ./lib/lucene-queryparser.js","test":"jasmine-node ./spec/ --verbose","prepublish":"npm run-script build && npm test"},"repository":{"type":"git","url":"git://github.com/xomyaq/lucene-queryparser.git"},"keywords":["lucene","query","parser","pegjs"],"author":{"name":"Troy Howard","email":"thoward37@gmail.com","url":"http://github.com/thoward"},"contributors":[{"name":"Eugeny Vlasenko","email":"mahnunchik@gmail.com","url":"http://mahnunchik.tumblr.com/"},{"name":"Ilnur Khalilov","email":"ilnur.khalilov@gmail.com","url":"https://github.com/xomyaq"}],"license":"Apache 2.0","bugs":{"url":"https://github.com/xomyaq/lucene-queryparser/issues"},"dependencies":{"amdefine":">=0.0.2"},"devDependencies":{"pegjs":"0.7.x","jasmine-node":"1.10.x"},"gitHead":"8910b84aa378611b29e1debc7489d7ae9a938fd0","homepage":"https://github.com/xomyaq/lucene-queryparser#readme","_id":"lucene-queryparser@2.0.0","_shasum":"4daa425eab385addc6671334b9db03dbe196ec20","_from":".","_npmVersion":"3.10.9","_nodeVersion":"7.2.1","_npmUser":{"name":"ilnur","email":"ilnur.khalilov@gmail.com"},"dist":{"shasum":"4daa425eab385addc6671334b9db03dbe196ec20","tarball":"https://registry.npmjs.org/lucene-queryparser/-/lucene-queryparser-2.0.0.tgz","integrity":"sha512-6yicC7CXhjjBlmgJ9NXv7APt1IGaw+Qq/NnEM0+VCh/hBy/6FYJIdHlk51ilBangTlkdpwg3BhtRw//e+ilYOg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC/YuDfolgKzYHTMZCjOHQdarqugtdTo09EWjao2ZhNUQIgUtOhYM/TDb1Bmpnmxuj3+DfEotZcHu7u69l0jChYSFY="}]},"maintainers":[{"name":"ilnur","email":"ilnur.khalilov@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/lucene-queryparser-2.0.0.tgz_1482508516719_0.9451583947520703"}},"2.0.1":{"name":"lucene-queryparser","version":"2.0.1","description":"Lucene Query Parser for Javascript created using PEG.js","main":"lib/lucene-queryparser.js","scripts":{"build":"PEG_OUT=`cat lib/lucene-query.grammar | node_modules/pegjs/bin/pegjs` && printf \"if (typeof define !== 'function') { var define = require('amdefine')(module) };\n\ndefine([], function() { \nvar module = {};\n%s\nreturn module.exports;\n});\n\"  \"$PEG_OUT\" > ./lib/lucene-queryparser.js","test":"jasmine-node ./spec/ --verbose","prepublish":"npm run-script build && npm test"},"repository":{"type":"git","url":"git://github.com/xomyaq/lucene-queryparser.git"},"keywords":["lucene","query","parser","pegjs"],"author":{"name":"Troy Howard","email":"thoward37@gmail.com","url":"http://github.com/thoward"},"contributors":[{"name":"Eugeny Vlasenko","email":"mahnunchik@gmail.com","url":"http://mahnunchik.tumblr.com/"},{"name":"Ilnur Khalilov","email":"ilnur.khalilov@gmail.com","url":"https://github.com/xomyaq"}],"license":"Apache 2.0","bugs":{"url":"https://github.com/xomyaq/lucene-queryparser/issues"},"dependencies":{"amdefine":">=0.0.2"},"devDependencies":{"pegjs":"0.7.x","jasmine-node":"1.10.x"},"gitHead":"ff11d0d0f08cf509bf9ab844b14d4b00bf2548d7","homepage":"https://github.com/xomyaq/lucene-queryparser#readme","_id":"lucene-queryparser@2.0.1","_shasum":"7e8ed370e0c68898aab17f3b38b935d87e171a52","_from":".","_npmVersion":"3.10.9","_nodeVersion":"7.2.1","_npmUser":{"name":"ilnur","email":"ilnur.khalilov@gmail.com"},"dist":{"shasum":"7e8ed370e0c68898aab17f3b38b935d87e171a52","tarball":"https://registry.npmjs.org/lucene-queryparser/-/lucene-queryparser-2.0.1.tgz","integrity":"sha512-FM0HyEFcC28nav4T993kFtCXm/iCR+EIaFhM3HHW9l3wfjUFe7ULkd9v6Vv8H4ra6+Zn1359I5fua3nRIPZ6jA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC00UIKgn0fm//0/wlF1q7CZqlzqrQYYGbi6+/VVImp/gIhALj41YcYK5d4/elF+P54SZY0LGdJCYTVHGbjVoHkzkRy"}]},"maintainers":[{"name":"ilnur","email":"ilnur.khalilov@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/lucene-queryparser-2.0.1.tgz_1482512442333_0.33082836284302175"}},"2.1.0":{"name":"lucene-queryparser","version":"2.1.0","description":"Lucene Query Parser for Javascript created using PEG.js","main":"lib/lucene-queryparser.js","scripts":{"build":"PEG_OUT=`cat lib/lucene-query.grammar | node_modules/pegjs/bin/pegjs` && printf \"if (typeof define !== 'function') { var define = require('amdefine')(module) };\n\ndefine([], function() { \nvar module = {};\n%s\nreturn module.exports;\n});\n\"  \"$PEG_OUT\" > ./lib/lucene-queryparser.js","test":"jasmine-node ./spec/ --verbose","prepublish":"npm run-script build && npm test"},"repository":{"type":"git","url":"git://github.com/xomyaq/lucene-queryparser.git"},"keywords":["lucene","query","parser","pegjs"],"author":{"name":"Troy Howard","email":"thoward37@gmail.com","url":"http://github.com/thoward"},"contributors":[{"name":"Eugeny Vlasenko","email":"mahnunchik@gmail.com","url":"http://mahnunchik.tumblr.com/"},{"name":"Ilnur Khalilov","email":"ilnur.khalilov@gmail.com","url":"https://github.com/xomyaq"}],"license":"Apache 2.0","bugs":{"url":"https://github.com/xomyaq/lucene-queryparser/issues"},"dependencies":{"amdefine":">=0.0.2"},"devDependencies":{"pegjs":"0.7.x","jasmine-node":"1.10.x"},"gitHead":"bc908eb5515d18d0b47ea6914c26a3230a9db076","homepage":"https://github.com/xomyaq/lucene-queryparser#readme","_id":"lucene-queryparser@2.1.0","_shasum":"629e4d5917a5697d3eae6483bae18f6fc4cbc480","_from":".","_npmVersion":"4.0.5","_nodeVersion":"7.4.0","_npmUser":{"name":"ilnur","email":"ilnur.khalilov@gmail.com"},"dist":{"shasum":"629e4d5917a5697d3eae6483bae18f6fc4cbc480","tarball":"https://registry.npmjs.org/lucene-queryparser/-/lucene-queryparser-2.1.0.tgz","integrity":"sha512-nY47CX0d8x9dP3N1Se6XJPfC9RZfCzg8TSed8d8MPvYvdyDu5YNeIlTCQHF1rRAh+XMa4eyWpk3R0SzlmS90eg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH7iBn5dRgTBi3IyqZmlhaychU9zyJT2SVt4uZKmT83hAiEAifIApK19dVwk/2fV/1oZ+esKzFjCOGabbunJQMxyUBQ="}]},"maintainers":[{"name":"ilnur","email":"ilnur.khalilov@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/lucene-queryparser-2.1.0.tgz_1484231403191_0.27151294727809727"}},"3.0.0":{"name":"lucene-queryparser","version":"3.0.0","description":"Lucene Query Parser for Javascript created using PEG.js","main":"lib/lucene-queryparser.js","scripts":{"build":"pegjs lib/lucene-query.grammar lib/lucene-queryparser.js","test":"jasmine-node ./spec/ --verbose","prepublish":"npm run build && npm test"},"repository":{"type":"git","url":"git://github.com/xomyaq/lucene-queryparser.git"},"keywords":["lucene","query","parser","pegjs"],"author":{"name":"Troy Howard","email":"thoward37@gmail.com","url":"http://github.com/thoward"},"contributors":[{"name":"Eugeny Vlasenko","email":"mahnunchik@gmail.com","url":"http://mahnunchik.tumblr.com/"},{"name":"Ilnur Khalilov","email":"ilnur.khalilov@gmail.com","url":"https://github.com/xomyaq"}],"license":"Apache 2.0","bugs":{"url":"https://github.com/xomyaq/lucene-queryparser/issues"},"dependencies":{"amdefine":">=0.0.2"},"devDependencies":{"pegjs":"0.7.x","jasmine-node":"1.10.x"},"gitHead":"bc908eb5515d18d0b47ea6914c26a3230a9db076","homepage":"https://github.com/xomyaq/lucene-queryparser#readme","_id":"lucene-queryparser@3.0.0","_shasum":"b3b59aab8bf85277bb69bf6329fd78a169923ec9","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.9.0","_npmUser":{"name":"ilnur","email":"ilnur.khalilov@gmail.com"},"dist":{"shasum":"b3b59aab8bf85277bb69bf6329fd78a169923ec9","tarball":"https://registry.npmjs.org/lucene-queryparser/-/lucene-queryparser-3.0.0.tgz","integrity":"sha512-E35wmYFmOR0LcIgiULEj3OPyLr3NdbTIlyrJ/EBSJkUVPqPQW381Ei1PsmvWPOri/kY8WJ649LlivVgSlLzwYw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIETXiBEhRzm9PKcNbqDRWfmNShZNXqEPR1jmahCagvXeAiEAzGanD8YUhDI7Q9jVRwkMXA5tK40h+QUF6SzN7zc0Xqc="}]},"maintainers":[{"name":"ilnur","email":"ilnur.khalilov@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/lucene-queryparser-3.0.0.tgz_1493131098209_0.4155135229229927"}}},"readme":"# Lucene Query Parser for JavaScript\r\n\r\nThis is an implementation of the Lucene Query Parser developed using PEG.js.\r\n\r\n## Example\r\n\r\nA quick example of how to use it:\r\n\r\n```javascript\r\nvar parser = require('lucene-queryparser');\r\n\r\n// return the expression tree\r\nvar results = parser.parse('title:\"The Right Way\" AND text:go');\r\n\r\nconsole.log(results['left']['field']);      // title\r\nconsole.log(results['left']['term']);       // The Right Way\r\nconsole.log(results['operator']);           // AND\r\nconsole.log(results['right']['field']);     // text\r\nconsole.log(results['right']['term']);      // go\r\n```\r\n\r\nA slightly more complicated example:\r\n\r\n```javascript\r\nvar parser = require('lucene-queryparser');\r\n\r\n// return the expression tree\r\nvar results = parser.parse('test AND (foo OR bar)');\r\n\r\nconsole.log(results['left']['term']);       // test\r\nconsole.log(results['operator']);           // AND\r\n\r\n// the grouped expression in parentheses becomes it's own nested node\r\nvar rightNode = results['right'];\r\n\r\nconsole.log(rightNode['left']['term']);     // foo\r\nconsole.log(rightNode['operator']);         // OR\r\nconsole.log(rightNode['right']['term']);    // bar\r\n```\r\n\r\n## Installation\r\n\r\n### On the Command-Line\r\n\r\nThe library is available as an npm module.\r\n\r\nTo install, run:\r\n\r\n```\r\nnpm install lucene-queryparser\r\n```\r\n\r\n## Unit Tests\r\n\r\nUnit tests are built with [Jasmine](http://pivotal.github.com/jasmine/).\r\n\r\n### On the Command-line\r\n\r\nTo run the unit tests on the command line, using node:\r\n\r\n```\r\nnpm test\r\n```\r\n\r\n## Grammar\r\n\r\nThe parser is auto-generated from a PEG implementation in Javascript called [PEG.js](http://pegjs.majda.cz/).\r\n\r\nTo test the grammar without using the generated parser, or if you want to modify it, try out [PEG.js online](http://pegjs.majda.cz/online>). This is a handy way to test an abritrary query and see what the results will be like or debug a problem with the parser for a given piece of data.\r\n","maintainers":[{"name":"ilnur","email":"ilnur.khalilov@gmail.com"}],"time":{"modified":"2022-06-19T14:37:24.866Z","created":"2016-12-22T17:55:28.361Z","1.0.0":"2016-12-22T17:55:28.361Z","2.0.0":"2016-12-23T15:55:18.949Z","2.0.1":"2016-12-23T17:00:42.887Z","2.1.0":"2017-01-12T14:30:05.270Z","3.0.0":"2017-04-25T14:38:18.900Z"},"homepage":"https://github.com/xomyaq/lucene-queryparser#readme","keywords":["lucene","query","parser","pegjs"],"repository":{"type":"git","url":"git://github.com/xomyaq/lucene-queryparser.git"},"contributors":[{"name":"Eugeny Vlasenko","email":"mahnunchik@gmail.com","url":"http://mahnunchik.tumblr.com/"},{"name":"Ilnur Khalilov","email":"ilnur.khalilov@gmail.com","url":"https://github.com/xomyaq"}],"author":{"name":"Troy Howard","email":"thoward37@gmail.com","url":"http://github.com/thoward"},"bugs":{"url":"https://github.com/xomyaq/lucene-queryparser/issues"},"license":"Apache 2.0","readmeFilename":"README.md"}