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
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
Oxlintはいいぞ(続)
yug1224
1
490
生成AIで帳票OCRが「簡単に」作れる時代になった?
kon_shou
0
1.2k
Dockerfile CMD for Node.js
grazie1999
0
150
思考垂れ流し開発 ~音声入力 × AIエージェント × 開発ハーネスによる試行錯誤~
npostring
0
480
Hono + Inertia + React で LP を構築した話
oukayuka
2
190
iOS開発×AI駆動開発 〜最近使って便利だったスキルの話〜
nogu66
0
110
異なる設計思想のフレームワークを経験して得た学び
amekuhideki
2
910
【デモ】Kiroで体験する仕様駆動開発|設計からコーディングまでAIと進める開発フロー
cmkudo
0
520
まずはプロンプトガイドを読もう、話はそれからだ
kiakiraki
1
240
片田舎のおっさん、 Swift Buildのダイアモンド問題解決の不具合修正PRを出すが、解決方法がキャッシュをしないようにすることであり、ビルド時間が伸びると言われてマージされないので高速化もする/swiftbuild
yimajo
0
320
まだ間に合う!今年の夏こそSchemeのマクロ展開器を完全理解!
omasanori
0
580
DynamoDBの基礎を振り返りながらベクトル検索機能を理解する
musan
3
250
Featured
See All Featured
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
840
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Bash Introduction
62gerente
615
220k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
HDC tutorial
michielstock
2
830
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
560
Designing for Timeless Needs
cassininazir
1
460
The agentic SEO stack - context over prompts
schlessera
0
880
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
430
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
410
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
260
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)
спасибо спасибо