Closed stjosh closed 6 years ago
The website is in this repository, please open an issue there, or better yet send a pull request ;)
Perfect, I was looking for the repo of the site but did not find it - shame on me. :smile: Will open a pull-request!
No problem, thanks for taking the time to open an issue and provide a fix!
See olivernn/lunr-site#3
Hi, I hope this is the correct place to post an issue on https://lunrjs.com/guides/index_prebuilding.html .
In the sample node script for building an Index,
var documents = JSON.parse(buffer.join())
is used to parse STDIN to a JSON array. However, this does not work for large inputs (i.e., in case the buffer has more than one element), because if called without arguments,join()
will join the array elements with a comma separator, resulting in invalid JSON. So, correct is:var documents = JSON.parse(buffer.join(''))
Many thanks for correcting this.