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
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
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
710
CSC307 Lecture 07
javiergs
PRO
0
550
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
170
Data-Centric Kaggle
isax1015
2
770
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.3k
360° Signals in Angular: Signal Forms with SignalStore & Resources @ngLondon 01/2026
manfredsteyer
PRO
0
120
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
110
AIによる開発の民主化を支える コンテキスト管理のこれまでとこれから
mulyu
3
190
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
560
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
140
AWS re:Invent 2025参加 直前 Seattle-Tacoma Airport(SEA)におけるハードウェア紛失インシデントLT
tetutetu214
2
110
Featured
See All Featured
How Software Deployment tools have changed in the past 20 years
geshan
0
32k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
49
Paper Plane (Part 1)
katiecoart
PRO
0
4k
The Cult of Friendly URLs
andyhume
79
6.8k
The untapped power of vector embeddings
frankvandijk
1
1.6k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
270
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Amusing Abliteration
ianozsvald
0
98
Music & Morning Musume
bryan
47
7.1k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
100
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
410
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
170
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