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
Haystack + ElasticSearch
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Gilang Chandrasa
June 29, 2013
Programming
2
2.4k
Haystack + ElasticSearch
Gilang Chandrasa
June 29, 2013
Tweet
Share
More Decks by Gilang Chandrasa
See All by Gilang Chandrasa
Docker + Django
gchandrasa
2
340
An Introduction to Celery
gchandrasa
8
5.1k
Other Decks in Programming
See All in Programming
Oxlintはいいぞ
yug1224
5
1.3k
2026年 エンジニアリング自己学習法
yumechi
0
130
Architectural Extensions
denyspoltorak
0
280
SourceGeneratorのススメ
htkym
0
190
dchart: charts from deck markup
ajstarks
3
990
CSC307 Lecture 08
javiergs
PRO
0
670
Smart Handoff/Pickup ガイド - Claude Code セッション管理
yukiigarashi
0
130
CSC307 Lecture 09
javiergs
PRO
1
830
AIによる開発の民主化を支える コンテキスト管理のこれまでとこれから
mulyu
3
260
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
160
開発者から情シスまで - 多様なユーザー層に届けるAPI提供戦略 / Postman API Night Okinawa 2026 Winter
tasshi
0
200
AgentCoreとHuman in the Loop
har1101
5
230
Featured
See All Featured
The Cost Of JavaScript in 2023
addyosmani
55
9.5k
Facilitating Awesome Meetings
lara
57
6.8k
Prompt Engineering for Job Search
mfonobong
0
160
Art, The Web, and Tiny UX
lynnandtonic
304
21k
Designing for Performance
lara
610
70k
sira's awesome portfolio website redesign presentation
elsirapls
0
150
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
90
First, design no harm
axbom
PRO
2
1.1k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.2k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
580
Optimizing for Happiness
mojombo
379
71k
Transcript
Haystack + ElasticSearch Gilang Chandrasa
Django Python PHP ElasticSearch HTML5 Memcache MongoDB Celery NginX Android
Git MySQL PostgreSQL Gilang Chandrasa CSS3
Haystack Why What How
A modular search for Django
lets you write your search code once and choose the
search engine you want it to run on
lets you write your search code once and choose the
search engine you want it to run on Solr, Elasticsearch, Whoosh and Xapian
pip install django-haystack Step 1 Install Haystack
INSTALLED_APPS = [ ... 'haystack', ] HAYSTACK_CONNECTIONS = { 'default':
{ 'ENGINE': '...', }, } Step 2 Configure settings.py
class NoteIndex(indexes.SearchIndex, indexes.Indexable): text = indexes.CharField(document=True, use_template=True) author = indexes.CharField(model_attr='user')
def get_model(self): return Note Step 3 Create search_index.py
{{ object.title }} {{ object.user.get_full_name }} {{ object.body }} Step
4 Create search template
Step 5 Install Search Engine Solr Xapian Whoosh ElasticSearch
Step 6 Indexing python manage.py rebuild_index
Some Advanced Uses Highlighting Autocomplete Boost Rich Content Extraction Spatial
Search
ElasticSearch
ElasticSearch distributed real-time search and analytics engine for the cloud
real time data real time analytics distributed high availability multi
tenancy full text search document oriented conflict management schema free restful API apache 2 open source license per operation persistence built on top apache lucene
Spatial Search within, dwithin, distance, order_by(‘distance’), polygon
location = Point(float(longitude), float(latitude)) SearchQuerySet()\ .dwithin('location', location,D(km=10))\ .distance('location',location)\ .order_by('distance') Search
places within 10km and order by distance
haystacksearch.org elasticsearch.org Further Reading
thank you!
Gilang Chandrasa twitter.com + github.com @gchandrasa