SlideShare ist ein Scribd-Unternehmen logo
1 von 39
Downloaden Sie, um offline zu lesen
foto: Anders Sandberg
Wednesday 6 November 13
Full text search met
elasticsearch in de praktijk
Jeroen van Wilgenburg, JPoint
@jvwilge
vanwilgenburg.wordpress.com

Wednesday 6 November 13
Vragen voor jullie

Wednesday 6 November 13
Vragen voor jullie
• Wie heeft Lucene wel eens gebruikt?

Wednesday 6 November 13
Vragen voor jullie
• Wie heeft Lucene wel eens gebruikt?
• SOLR?

Wednesday 6 November 13
Vragen voor jullie
• Wie heeft Lucene wel eens gebruikt?
• SOLR?
• Compass?

Wednesday 6 November 13
Vragen voor jullie
• Wie heeft Lucene wel eens gebruikt?
• SOLR?
• Compass?
• elasticsearch?

Wednesday 6 November 13
Vragen voor jullie
• Wie heeft Lucene wel eens gebruikt?
• SOLR?
• Compass?
• elasticsearch?
• waar komen de servernamen vandaan?
Wednesday 6 November 13
Wat is elasticsearch?
• full text search engine obv Lucene
• REST-api
• Distributed / High availability
• Document oriënted (nested maps)
Wednesday 6 November 13
Wie gebruiken es?

Wednesday 6 November 13
Ook elastic
• elastic compute cloud (EC2)
• elastic beanstalk
• elastic load balancer
• elastic map reduce
• elastic transcoder
• Elasticache
foto: Nick Richards
Wednesday 6 November 13
BPO-register
• vinden van koopvaardijschepen met historie
• Hibernate Envers, Spring en Twitter
Bootstrap

• begonnen met Hibernate Search, vervangen
door elasticsearch

• géén clustering gebruikt
Wednesday 6 November 13
Hibernate Search

foto: Flickr - DVIDSHUB
Wednesday 6 November 13
elasticsearch

foto: Flickr - quinn anya
Wednesday 6 November 13
Clusternaam

Wednesday 6 November 13
Pas op met defaults!
• Gericht op ec2
• Goed om elasticsearch te leren
• 10 hits bij zoekresultaten
• voorbeeld (filmpje)
Wednesday 6 November 13
Insecure by design
• zorg dat elasticsearch in gesloten netwerk
draait

• wat er niet is kan ook niet stuk

Wednesday 6 November 13
Documentatie
• elasticsearch.org
• docs, blogs, video’s (es + youtube)
• google & stackoverflow
• boek van O’reilly in ontwikkeling
Wednesday 6 November 13
Community/support
• binnen dag reactie op artikel
• www.meetup.com/ElasticSearch-NL
• Gevestigd in Amsterdam

Wednesday 6 November 13
Tools
• command line curl +

chrome web inspector

• plugins
• elasticsearch head
• Inquisitor
• Elastic HQ
Wednesday 6 November 13
Query basics
• rotterdam
• name:rotterdam
• name:rotterdam +homeport:amsterdam
• +name:rotterdam +homeport:amsterdam
• *gracht
• happy abis dover
• happy abis^2 dover
Wednesday 6 November 13
Mappings
• default: dynamic mapping (schemaless)
• include_in_all

Wednesday 6 November 13
Analyzers
• index analyzer
• search analyzer
• _all is aparte analyzer (ipv per key)
• Inquisitor-plugin (demo)
Wednesday 6 November 13
Diakrieten
• instellen bij beide analyzers
• encoding van Spring
• encoding van EC2
• stackoverflow.com/questions/12016318/
Wednesday 6 November 13
Wildcard
• apart opgeven in query
• suffix-wildcard is ok
• prefix is traaaaag
• boosting werkt niet meer (in onderzoek)
• “rewrite” : “scoring_boolean”
Wednesday 6 November 13
NL

AG

UK

NO

CY

LR

IT

BS

PA

BE

MT

GI

©2013 The World Flag Database & Graham Bartram

Wednesday 6 November 13
NL

AG

UK

NO

CY

LR

IT

BS

PA

BE

MT

GI

©2013 The World Flag Database & Graham Bartram

Wednesday 6 November 13
NO

IT

BE
©2013 The World Flag Database & Graham Bartram

Wednesday 6 November 13
Stop words
• a, an, and, are, as, at, be, but, by, for, if, in,

into, is, it, no, not, of, on, or, such, that, the,
their, then, there, these,they, this, to, was,
will, with

Wednesday 6 November 13
Scoring
• ‘magic’ formula
• oa. aantal voorkomens van term in hele set

Wednesday 6 November 13
Sorteren
• “Can’t sort on string types with more than

one value per doc, or more than one token
per field”

• Voeg veld <veldnaam>.untouched toe
• http://bit.ly/wFd8CZ
Wednesday 6 November 13
Sorteren
• Lastig uitleggen aan eindgebruikers
• Gebruik een balkje met rang

Wednesday 6 November 13
Spring
• github.com/dadoonet
• Tweet David Pilato dat je het gebruikt
• Maak voldoende testqueries
• codevoorbeeld
Wednesday 6 November 13
Unit-test
• refresh na een update
• draai unit-test op andere poort/clusternaam
• codevoorbeeld

Wednesday 6 November 13
Sharding en scoring
• Default is score per shard bereken
• Cluster scores die dicht bij elkaar liggen en
ga dan sorteren

• dfs query then fetch (http://bit.ly/1cBRxMv)

Wednesday 6 November 13
Conclusie
• Snel aan de slag
• Even zoeken naar de goede documentatie
• Scoring snappen snel waardevol

Wednesday 6 November 13
Vragen?

Wednesday 6 November 13
Logstash + Kibana

Wednesday 6 November 13
elasticsearch in
de praktijk
Jeroen van Wilgenburg
www.jpoint.nl
@jvwilge

vanwilgenburg.wordpress.com
photo by ny156uk on Flickr

Wednesday 6 November 13

Weitere ähnliche Inhalte

Empfohlen

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Saba Software
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming Language
Simplilearn
 

Empfohlen (20)

How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming Language
 

Full text search met ElasticSearch in de praktijk