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

substring match #198

Closed rrevanth closed 8 years ago

rrevanth commented 8 years ago

Hi,

Is there any option for having substring match anywhere in the tags.

For example:

The word 'artificial intelligence' is there in index but not matches when searched intelli or such.

olivernn commented 8 years ago

Substring matching is only available for token prefixes, so given the token hello a search for hel would match, but a search for ello would not.

This is a limitation of the current implementation of lunr.