Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
An Introduction to search-index
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Mats Julian Olsen
September 19, 2015
Programming
2
450
An Introduction to search-index
Mats Julian Olsen
September 19, 2015
Tweet
Share
Other Decks in Programming
See All in Programming
AIによる高速開発をどう制御するか? ガードレール設置で開発速度と品質を両立させたチームの事例
tonkotsuboy_com
7
2.4k
今から始めるClaude Code超入門
448jp
8
9k
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
230
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
610
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
4k
ノイジーネイバー問題を解決する 公平なキューイング
occhi
0
110
Oxlintはいいぞ
yug1224
5
1.4k
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
210
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
750
360° Signals in Angular: Signal Forms with SignalStore & Resources @ngLondon 01/2026
manfredsteyer
PRO
0
130
CSC307 Lecture 10
javiergs
PRO
1
660
CSC307 Lecture 08
javiergs
PRO
0
670
Featured
See All Featured
Mobile First: as difficult as doing things right
swwweet
225
10k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
71
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
1.9k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.7k
Rails Girls Zürich Keynote
gr2m
96
14k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
170
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
77
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Transcript
An introduction to search-index A persistent full text search engine
for the browser and Node.js
Mats Julian Olsen Mathematics Search @ Comperio twitter.com/mewwts github.com/mewwts
Underlying technology of Norch, a search server (like Elasticsearch or
Solr) that you can install with npm. About search-index
Features • Search • Facets • Filters • Matcher •
Stopwords • Snapshots • Replication • Weighting • Del/Update
None
“Node.js project that aims to provide a common, portable interface
to a multitude of LevelDB forks.” — leveldb.org LevelUP
search-index can use any LevelUP-compliant database as a backend. Backend
Agnostic
None
Makes code that ‘require’s run in the browser by bundling
dependencies. Browserify
Serverside: LevelDB, MongoDB ++ Clientside: IndexedDB, LocalStorage ++ search-index is
Backend Agnostic
Lower bandwidth costs, lower hardware costs, scales naturally search-index runs
client side
Performance & user experience People are offline search-index runs offline
npm install search-index git clone github.com/fergiemcdowall/search-index Install
var si = require('search-index')(opts);
var si = require('search-index')({ db: fancyDatabase });
si.add(data, function (err) { // data is now indexed });
si.add(data, {}, function (err) { // data is now indexed
});
{ title: 'Indian banks provide record low interest rates', body:
'...', topics: [ 'banking' ], country: ['India'], id: 0 }
si.search(query, function (err, res) { // res.hits holds results });
// Search for India and bank in all fields {'query':
{'*': ['India', 'bank']}} // Search for India and bank in title field {'query': {'title': ['India', 'bank']}} // search for India in title and bank in body {'query': {'title': ['India'], 'body': ['bank']}}
// Search for bank in all fields // Show facets
on country field { 'query': { '*': ['bank'] }, 'facets': { 'country': {} } } // {India: 6, USA: 2, Norway: 1} //
// Search for bank in all fields // Filter on
country='India' { 'query': { '*': ['bank'] }, 'filters': { 'country': [['India', 'India']] } }
// Filter on country=‘India' or // country=‘Norway’ { 'query': {
'*': ['bank'] }, 'filters': { 'country': [ ['India', 'India'], ['Norway', 'Norway'] ] } }
search-index in Node.js https://github.com/fergiemcdowall/search-index- simple-node-js-example
search-index with IndexedDB http://mewwts.github.io/search-index-browser-with- facets/
search-index Replication http://mewwts.github.io/search-index-replicate-over- http-example/
search-index running in a WebWorker http://mewwts.github.io/search-index-webworker- example/
search-index in the Future Modular builds(add, search), streaming API, index
structure.
Get involved Make apps, submit PRs, issues or bring it
to new platforms. github.com/fergiemcdowall/search-index
Thanks a bunch Questions?