{"_id":"@booxood/lunr","_rev":"1-a5e7871fc6f9bb4dfb45966513ca1501","name":"@booxood/lunr","dist-tags":{"latest":"0.7.1"},"versions":{"0.7.1":{"name":"@booxood/lunr","description":"Simple full-text search in your browser.","version":"0.7.1","author":{"name":"Oliver Nightingale"},"keywords":["search"],"homepage":"http://lunrjs.com","bugs":{"url":"http://github.com/olivernn/lunr.js/issues"},"main":"lunr.js","license":"MIT","repository":{"type":"git","url":"git+https://github.com/olivernn/lunr.js.git"},"devDependencies":{"dox":"0.4.4","dox-template":"0.1.1","phantomjs":"1.8.1-3","uglify-js":"2.4.13"},"scripts":{"test":"make test","start":"node server.js"},"dependencies":{"nodejieba":"^2.0.0"},"gitHead":"7622590806fde24d74c80903baec8d5787ca7ad6","_id":"@booxood/lunr@0.7.1","_npmVersion":"6.1.0","_nodeVersion":"10.3.0","_npmUser":{"name":"booxood","email":"liucw.mail@gmail.com"},"dist":{"integrity":"sha512-tqRgryQHqMOxy3jBx108MzWCt3hS7s04lnbYEwlojMTM/EeGn4UvZQRfUCoAv+dpiMGnuqFSNDSHdUN+c0dHhA==","shasum":"f6bfe43d17b9dd42d3ab3134d274bfb79f9d395a","tarball":"https://registry.npmjs.org/@booxood/lunr/-/lunr-0.7.1.tgz","fileCount":89,"unpackedSize":2397862,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbT4JCRA9TVsSAnZWagAAoTkP/1Zcpn+n9WrR/+qAlbz1\nbp3c8DMlXHK5m9IpISGUtXLPaWQvAIqGNCrzNuZ770xpk6kDRJQbzK5/DoF7\nSxJkstvj6q9niDrTA2PwdYBYZOgGOFxY6xj/JXUn6iACN3r8rtcGt/yYXb3T\nJDbyf8yA45xRSJBCH9v9NJMUL1vEKeYo3+scqGWMGVRCxwU5cHL1yiZNRb53\nAsg5cMIzFpAXAoF5i+a/cgDOmqvfKk7UOnmE49DXiQGZxE7IeKVdhfe8jDo3\nXbWMD4CUvEjSBBwmhVHj4LiHTJ/v1gUgMVT/5EH6eZef+rMCxECWYLqqEiwt\n9zc7C9PiORp87u1UofVHpVk/knAIFI7mBnm7ANCmL8QEjFLrLwBHzUy/bHzt\nX/M+Eg+c/M4T08dCEwR2bhrjateQaWpzzdmA8gc6s33EG0S91Sy8THhfZBUP\nMHkT85Vtdjtpu93Ytxyym0aTYHkt2Cx+ZrCPYVeCuTS2v1dfT/LB9CWBaCxs\nUry2o4C4maH4Bh+t5aosd6JNKd18XN3O9H5IUOugV3hr/qgf44B5k2LYHU4h\nrygAYUElZ+CBKNORmdu7/tqPS/+eA2zx21jf1REPqMlwDfwhbQGXPobOhYO9\ny6XxCdheTVxFFJqIMInFwBwKGEkJlM2ZN8XoP9jKZ/ird41z2dv6b3IQKXJK\nsiTj\r\n=FvIP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHRyaqnDQvUa6Zc1fE7WrEUB4+xUPrpNd85yxxLW+fZlAiBw7q34zT/Q0LsYd0j6FlBF2On280A52CDWZa0V/GU9fg=="}]},"maintainers":[{"name":"booxood","email":"liucw.mail@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lunr_0.7.1_1533885960973_0.6366552582686247"},"_hasShrinkwrap":false}},"time":{"created":"2018-08-10T07:26:00.707Z","0.7.1":"2018-08-10T07:26:01.125Z","modified":"2022-04-04T20:11:58.996Z"},"maintainers":[{"name":"booxood","email":"liucw.mail@gmail.com"}],"description":"Simple full-text search in your browser.","homepage":"http://lunrjs.com","keywords":["search"],"repository":{"type":"git","url":"git+https://github.com/olivernn/lunr.js.git"},"author":{"name":"Oliver Nightingale"},"bugs":{"url":"http://github.com/olivernn/lunr.js/issues"},"license":"MIT","readme":"Use a node module to index the document content, if you want to use this in a browser,index documents in command line, dump lunr index object to a file and use that file to init lunr.js in browser, the file may be very large if the document is large.\n\n使用nodejs库 nodejieba 来分词，nodejieba本身是对c++库的封装，所以安装这个模块的时候需要c++环境\n\n如果需要在前端使用搜索功能，需要先在后端处理文件，把索引保存成json格式，然后在前端引用\n\n最初只是为了替换 gitbook 中的lunr依赖\n\n注意：没有补全对应的测试用例\n\n------\n# Lunr.js\n\n[![Join the chat at https://gitter.im/olivernn/lunr.js](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/olivernn/lunr.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n[![Build Status](https://travis-ci.org/olivernn/lunr.js.png?branch=master)](https://travis-ci.org/olivernn/lunr.js)\n\nA bit like Solr, but much smaller and not as bright.\n\n## Example\n\nA very simple search index can be created using the following:\n\n```javascript\nvar idx = lunr(function () {\n    this.field('title', { boost: 10 })\n    this.field('body')\n})\n```\n\nAdding documents to be indexed is as simple as:\n\n```javascript\nvar doc = {\n    \"title\": \"黄金时代\",\n    \"body\": \"那一天我二十一岁，在我一生的黄金时代，我有好多奢望。我想爱，想吃，还想在一瞬间变成天上半明半暗的云。后来我才知道，生活就是个缓慢受锤的过程，人一天天老下去，奢望也一天天消失，最后变得像挨了锤的牛一样。可是我过二十一岁生日时没有预见到这一点。我觉得自己会永远生猛下去，什么也锤不了我。\",\n    \"author\": \"王小波\",\n    \"id\": 1\n}\nidx.add(doc)\n```\n\nThen searching is as simple:\n\n```javascript\nidx.search(\"生活\")\n```\n\nThis returns a list of matching documents with a score of how closely they match the search query:\n\n```javascript\n[{\n    \"ref\": 1,\n    \"score\": 0.0011097036390631915\n}]\n```\n\n[API documentation](http://lunrjs.com/docs) is available, as well as a [full working example](http://lunrjs.com/example/).\n\n## Description\n\nLunr.js is a small, full-text search library for use in the browser.  It indexes JSON documents and provides a simple search interface for retrieving documents that best match text queries.\n\n## Why\n\nFor web applications with all their data already sitting in the client, it makes sense to be able to search that data on the client too.  It saves adding extra, compacted services on the server.  A local search index will be quicker, there is no network overhead, and will remain available and useable even without a network connection.\n\n## Installation\n\nSimply include the lunr.js source file in the page that you want to use it.  Lunr.js is supported in all modern browsers.\n\nBrowsers that do not support ES5 will require a JavaScript shim for Lunr to work. You can either use [Augment.js](https://github.com/olivernn/augment.js), [ES5-Shim](https://github.com/kriskowal/es5-shim) or any library that patches old browsers to provide an ES5 compatible JavaScript environment.\n\n## Contributing\n\nSee the [`CONTRIBUTING.mdown` file](CONTRIBUTING.mdown).\n","readmeFilename":"README.mdown"}