{"_id":"@hyperdx/lucene","_rev":"3-b7b5bc6573b284926df8cf762b69a3fe","name":"@hyperdx/lucene","dist-tags":{"latest":"3.1.1"},"versions":{"3.1.1":{"name":"@hyperdx/lucene","version":"3.1.1","keywords":["lucene","query","parser","pegjs","formatter"],"author":{"url":"http://github.com/bripkens","name":"Ben Ripkens","email":"bripkens@gmail.com"},"license":"MIT","_id":"@hyperdx/lucene@3.1.1","maintainers":[{"name":"mikeshi42","email":"hi@michaelshi.me"},{"name":"wrn14897","email":"warren@deploysentinel.com"}],"homepage":"https://github.com/bripkens/lucene#readme","bugs":{"url":"https://github.com/bripkens/lucene/issues"},"dist":{"shasum":"b860fc26547628de1185e175a47d7909d3d77f37","tarball":"https://registry.npmjs.org/@hyperdx/lucene/-/lucene-3.1.1.tgz","fileCount":8,"integrity":"sha512-Kx3WgUI1FUeHOQB0nPtijc7L2Po9QaKTMSj4P1B3Qt6UNHJuJ0x04G+BfNYeCBy6c0LSkOlsyhFtzwXVkSIv6Q==","signatures":[{"sig":"MEQCIBMCRqkRexoo5pywaxzfn5CL/aSh7c0mxWb9SmKzR2hyAiAjEE4KgSdZbhYZnPxXcSHHTlPm39bwpA0XTyiioDpE/g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":82449},"main":"lib/lucene.js","gitHead":"350a6c61e6ab2971ef30a0d6732dfc33a6111bd5","scripts":{"test":"npm run build && mocha --exit && eslint lib test","build":"cat lib/lucene.grammar | pegjs > ./lib/queryParser.js","precommit":"npm test","prepublish":"npm run build && npm test"},"_npmUser":{"name":"mikeshi42","email":"hi@michaelshi.me"},"repository":{"url":"git://github.com/bripkens/lucene.git","type":"git"},"_npmVersion":"9.3.1","description":"Lucene query parser and formatter for JavaScript created using PEG.js","directories":{},"_nodeVersion":"18.14.0","_hasShrinkwrap":false,"devDependencies":{"chai":"^3.5.0","husky":"^0.12.0","mocha":"^10.2.0","pegjs":"^0.10.0","eslint":"^6.1.0","istanbul":"^0.4.5","coveralls":"^3.0.5","babel-eslint":"^7.1.1"},"_npmOperationalInternal":{"tmp":"tmp/lucene_3.1.1_1686986315812_0.004417208837082631","host":"s3://npm-registry-packages"}}},"time":{"created":"2023-06-17T07:18:35.742Z","modified":"2026-03-10T20:53:45.503Z","3.1.1":"2023-06-17T07:18:35.982Z"},"bugs":{"url":"https://github.com/bripkens/lucene/issues"},"author":{"url":"http://github.com/bripkens","name":"Ben Ripkens","email":"bripkens@gmail.com"},"license":"MIT","homepage":"https://github.com/bripkens/lucene#readme","keywords":["lucene","query","parser","pegjs","formatter"],"repository":{"url":"git://github.com/bripkens/lucene.git","type":"git"},"description":"Lucene query parser and formatter for JavaScript created using PEG.js","maintainers":[{"email":"warren@hyperdx.io","name":"wrn14897"},{"email":"hi@michaelshi.me","name":"mikeshi42"}],"readme":"# lucene &nbsp; [![Build Status](https://travis-ci.org/bripkens/lucene.svg?branch=master)](https://travis-ci.org/bripkens/lucene) [![Coverage Status](https://img.shields.io/coveralls/bripkens/lucene.svg)](https://coveralls.io/r/bripkens/lucene?branch=master) [![npm version](https://badge.fury.io/js/lucene.svg)](https://badge.fury.io/js/lucene)\n\nParse, modify and stringify lucene queries.\n\n**[Installation](#installation) |**\n**[Try It](https://runkit.com/npm/lucene) |**\n**[Usage](#usage) |**\n**[Grammar](#grammar) |**\n**[History](#history)**\n\n---\n\n## Installation\n\n```\nnpm install --save lucene\n-or-\nyarn add lucene\n```\n\n## Usage\n\n```javascript\nconst lucene = require('lucene');\n\nconst ast = lucene.parse('name:frank OR job:engineer');\nconsole.log(ast);\n// {\n//   left: {\n//     field: 'name',\n//     term: 'frank'\n//   },\n//   operator: 'OR',\n//   right: {\n//     field: 'job',\n//     term: 'engineer'\n//   }\n// }\n\nconsole.log(lucene.toString(ast));\n// name:frank OR job:engineer\n```\n\n\n## Grammar\nThe parser is auto-generated from a PEG implementation in JavaScript called [PEG.js](https://pegjs.org/).\n\nTo test the grammar without using the generated parser, or if you want to modify it, try out [PEG.js online](http://pegjs.org/online). This is a handy way to test arbitrary queries and see what the results will be like or debug a problem with the parser for a given piece of data.\n\n\n## History\nThis project is based on [thoward/lucene-query-parser.js](https://github.com/thoward/lucene-query-parser.js) and its forks (most notably [xomyaq/lucene-queryparser](https://github.com/xomyaq/lucene-queryparser)). The project is forked to allow some broader changes to the API surface area, project structure and additional capabilities.\n","readmeFilename":"README.md"}