最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Client side javascript equivalent to Lucene - Stack Overflow

programmeradmin0浏览0评论

I was wondering if there's a Javascript equivalent to the Lucene API, designed to be used on client side to index a relatively small data set.

An example use case would be a static site (generated for instance) with the ability to search content without server side processing.

I was wondering if there's a Javascript equivalent to the Lucene API, designed to be used on client side to index a relatively small data set.

An example use case would be a static site (generated for instance) with the ability to search content without server side processing.

Share Improve this question asked Apr 14, 2014 at 10:44 Raphaël LemaireRaphaël Lemaire 1,3091 gold badge13 silver badges23 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 4

I've found this : http://lunrjs./ It looks like what I'm searching for but doesn't seem to support fuzzy searches.

Theoretically, you could use Search-index in conjunction with node-browserify or another similar hack. Practically, I doubt this effort is worth pursuing.

You also have search-index as @mindas mentions. Lunr is more mature, and easier to get up and runnig, but search-index is maybe more feature rich? As with lunr, you'll need to do stemming on the data you want to index and/or use the matcher. The matcher does prefix search and returns words and/or phrases that is present in your document index.

I'm biased, but I think it's now wort the effort to use search-index. There are now some examples on how to use it client side with browserify.

发布评论

评论列表(0)

  1. 暂无评论