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
ElasticSearch
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
nyumatova
August 24, 2012
Programming
230
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ElasticSearch
nyumatova
August 24, 2012
More Decks by nyumatova
See All by nyumatova
Commit messages
nyumatova
5
3.3k
Other Decks in Programming
See All in Programming
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
3
810
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
280
ローカルLLMでどこまでコードが書けるか -縮小版 / How much code can be written on a local LLM Shortened
kishida
2
160
才能?センス?知らん、 続けたもん勝ちだ。-- 結婚・出産・癌を越えてなお、私がプロダクトを創り続ける理由
16bitidol
2
620
[2026年度第1回ORセミナー] 計画最適化ベンチャーと競技プログラミング人材
terryu16
0
280
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
8
3.8k
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
150
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
270
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
310
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
210
act1-costs.pdf
sumedhbala
0
140
はてなアカウント基盤 State of the Union
cockscomb
1
1.2k
Featured
See All Featured
Building Applications with DynamoDB
mza
96
7.1k
We Have a Design System, Now What?
morganepeng
55
8.2k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
170
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
410
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2k
Designing Experiences People Love
moore
143
24k
Darren the Foodie - Storyboard
khoart
PRO
3
3.4k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
880
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
220
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
55k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
590
Transcript
Полнотекстовый поиск Полнотекстовый поиск
Зачем? Зачем? Ответ прост - производительность
Какой выбор? Какой выбор? Elastic Search Solr Xapian Sphinx
Почему ElasticSearch? Почему ElasticSearch? Хорошая поддержка русского языка Прост в
установке и настройке Удобная работа с индексами Приятный Query DSL (domain-specific language) pyes и elasticutils (от mozilla) Индексация в режиме реального времени
elasticutils (pyes): индексы elasticutils (pyes): индексы from elasticutils import get_es
connector = get_es(hosts=['127.0.0.1:9200']) connector.delete_index_if_exists('crm') connector.create_index('crm', settings=SETTINGS) connector.put_mapping('clients', { 'properties': CLIENTS_MAPPING, '_type': {'store': 'yes'} }, ['crm']) connector.put_mapping('contacts', { 'properties': CONTACTS_MAPPING, '_type': {'store': 'yes'} }, ['crm'])
ElasticSearch REST API curl ElasticSearch REST API curl $ curl
-‐XGET 'http://localhost:9200/crm/_search' -‐d '{ 'filter': { 'and': [{'term': {'_type': u'clients'}}, {'term': {'is_client': True}}] }, 'query': { 'query_string': {'query': u'петров', 'default_field': 'content'} }, 'sort': [{u'modified_on': 'desc'}], 'from': 15, 'size': 5, 'fields': ['id'] }'
elasticutils elasticutils Удобный Django-QuerySet-like API для работы с ElasticSearch
elasticutils: базовый класс elasticutils: базовый класс from elasticutils import S
searcher = S().indexes('crm')
elasticutils: query elasticutils: query ... query = u'иванов' searcher =
searcher.query( content__query_string=query )
elasticutils: filter elasticutils: filter ... kwargs = {'is_client': True} searcher
= searcher.filter(**kwargs)
elasticutils: order_by elasticutils: order_by ... order_by = '-‐title' searcher =
searcher.order_by(order_by)
спасибо спасибо