Reputation: 1309
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.
Upvotes: 5
Views: 3704
Reputation: 331
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.
Upvotes: 0
Reputation: 1309
I've found this : http://lunrjs.com/ It looks like what I'm searching for but doesn't seem to support fuzzy searches.
Upvotes: 4
Reputation: 26703
Theoretically, you could use Search-index in conjunction with node-browserify or another similar hack. Practically, I doubt this effort is worth pursuing.
Upvotes: 3