amyxzhang / lucy.js

A full-text search engine in the browser
22 stars 3 forks source link

Prefix free doesn't seem to search parts of a word #4

Closed LeaVerou closed 9 years ago

LeaVerou commented 9 years ago

So wait returns results for waiting as well (probably due to stemming) but waiti returns nothing. Shouldn't it return results with waiting too? I can fix it, but I wanted to ask in case I misunderstood something.

manalinaik commented 9 years ago

It's because stemming happens when the word is inserted in the tree. So instead "waiting" never gets inserted in the tree at all, just "wait". Could you go ahead and just get rid of stemming for insertions and searches into a trie (prefix and suffix)?

LeaVerou commented 9 years ago

Will do!

LeaVerou commented 9 years ago

Fixed with 4593393f735a4dfcc698df1f85908c10aaef0c5a