olivernn / lunr.js

A bit like Solr, but much smaller and not as bright
http://lunrjs.com
MIT License
8.96k stars 548 forks source link

fixes #27 #28

Closed gambhiro closed 11 years ago

gambhiro commented 11 years ago

Small fix and test for issue #27.

olivernn commented 11 years ago

Hmm, this seems to have broken something else where - https://travis-ci.org/olivernn/lunr.js/builds/7211340

I'll have a look to see what the issue is, if you find it before me let me know and push a fix…

olivernn commented 11 years ago

Ok I found out what was breaking the tests, when adding a document lunr always expects a field to have at least one token in it.

The bug in the tokenizer was masking this bug in index.add, I'll add my fix to this pull request and then we should be good to go.