SlideShare a Scribd company logo
1 of 52
Laravel and ElasticSearch
Getting started building a powerful search engine
Peter Steenbergen
Who am I?
What I am about to cover
• Benefits of ElasticSearch
• ElasticSearch Basics
• Examples of Searchengines
• Installing the tools
• Analyzing and feeding the data
• Searching with Laravel and ElasticSearch through VueJS
What I do NOT cover
• Type of queries
• Analyzers
• Filters
• Percolator
• Internals of Elasticsearch (Lucene Index)
• Talk of Elze Kool - GroningenPHP
https://bitbucket.org/elzekool/talk-solr-elasticsearch-internals/src
The internals will cover how a score is determined in the background.
Benefits of ElasticSearch
What is a “powerful search”?
• Fast
Search in milliseconds, not in seconds.
• Relevant
If you search for a Hotel in California, don’t return Hotels in
Groningen. Or a black Audi, you don’t want to see a white Peugeot
107.
• Scalable
If your data grows, then you need more resources. It could mean by
vertical scaling or (better) horizontal scaling of capacity.
MySQL Drawbacks for searching through text
• LIKE %%
• Fast? No, try searching for millions of records with multiple joins to combine
all the information needed.
• Relevant? No, Try search for “PHP programmeur” or “PHP developer”, or
“Audi A8 zwart” or “zwarte Audi A8“.
• Scalable? Could be, but with much hassle in configurations in production and
backing up.
• Facets / Counts – How many Audi’s? How many black cars? Takes
multiple query’s for the calculation of those counts.
NB: FULL TEXT not noted here, gave a bit better result but not great.
ElasticSearch Basics
The Elastic Stack – formerly known as ELK stack
Usage of the Elastic stack
• Time-series data
Log files, searched queries, view count of document
• Insights in your data
• Machine-Learning capabilities
• Reversal of search queries with percolator (storing search queries)
• Zero-downtime* index swapping
Last 7 days, Last 30 days, or products => products-20180327
Components of ElasticSearch
• Node
Instance of ElasticSearch.
• Cluster
One or more nodes that work together to serve the same data and
API requests.
• Document
A piece of stored data you want to search for. (MySQL Row)
• Index
A collection of documents that have somewhat similar characteristics.
(MySQL Table)
CRUD operations
Searchengine Examples
Lets build that coolblue page!
First up: installation of the following tools
• MySQL (ElasticSearch does not support transactions!)
• ElasticSearch
• Laravel
• VueJS / VueX
Setting up / Starting MySQL on OSX
• Default credentials
User: root
Password: <empty>
Port: 3301
> Now create a Database called “coolshop”
Installing laravel
• We use composer for the installation
• If you don’t have it, get it from here: https://getcomposer.org
Run the following in your terminal: Laravel Installer:
Setting up / Starting ElasticSearch on OSX
Settings / name, cluster_name:
/usr/local/etc/elasticsearch/elasticsearch.yml
Java Virtual Machine options:
/usr/local/etc/elasticsearch/jvm.options
-Xms2g => -Xms256m
-Xmx2g => -Xmx256m
Maximum of 32GB per node is recommended
NB: 256m is for small dev boxes and not production!!
Installing additional packages
• ElasticSearch composer package
• Guzzle (optional)
• VueX for using Store
• Setup default FrontEnd scaffold
Creating the Service Provider and Config
• config/elasticsearch.php
Setting the ElasticSearch ServiceProvider
Register the ElasticSearch ServiceProvider
NB: config/app.php
Commands
• app/Console/Kernel.php
Testing the setup – we go Ping-Pong
Analyzing and Feeding the data
Analyzing the data
• Image
• AwardImage
• Title
• Rating
• ReviewCount
• ProductOptions
• Price
• PriceSecondChange
• InStock
• TypeRouter
• Brand
• CoolbluesChoice
• AdministratorOptions
Mapping the data
Analyzing the data
• Image => Keyword
• AwardImage => Keyword
• Title => Text
• Rating => Float
• ReviewCount => Integer
• ProductOptions => Text
• Price => Float
• PriceSecondChange => Float
• InStock => Boolean
• TypeRouter => Keyword
• Brand => Keyword
• CoolbluesChoice => Keyword
• AdministratorOptions => Keyword
Put the mapping in ElasticSearch
Kibana is a no-brainer for this. It has an own
Dev Console.
Or with the PHP Client of ElasticSearch.
Lets inject some data in the Elasticsearch
Front-End integration
Compile the front-end
In the console run:
• Development
npm run dev one-time build
npm run watch listener for changes
• Production
npm run production
Connecting the dots
Adding the endpoint – api.php
Aggregations
Transform the result
The end result
Questions?
Twitter / Github: @petericebear
Email: psteenbergen@gmail.com
Blog: http://petericebear.github.io/
COUPONCODE: ELASTICMEETING
50% OFF - FIRST MONTH – Hosting
sales@virtio.nl

More Related Content

What's hot

Importance of Solution Architecture in Automation
Importance of Solution Architecture in AutomationImportance of Solution Architecture in Automation
Importance of Solution Architecture in AutomationCristina Vidu
 
Hadoop Administration pdf
Hadoop Administration pdfHadoop Administration pdf
Hadoop Administration pdfEdureka!
 
Web application framework
Web application frameworkWeb application framework
Web application frameworkPankaj Chand
 
Overview SQL Server 2019
Overview SQL Server 2019Overview SQL Server 2019
Overview SQL Server 2019Juan Fabian
 
Scalable and Available, Patterns for Success
Scalable and Available, Patterns for SuccessScalable and Available, Patterns for Success
Scalable and Available, Patterns for SuccessDerek Collison
 
Introducing the SnapLogic Integration Cloud
Introducing the SnapLogic Integration CloudIntroducing the SnapLogic Integration Cloud
Introducing the SnapLogic Integration CloudDarren Cunningham
 
UiPath vs Automation Anywhere Comparison
UiPath vs Automation Anywhere ComparisonUiPath vs Automation Anywhere Comparison
UiPath vs Automation Anywhere ComparisonTangentia
 
An Overview of Web Services: SOAP and REST
An Overview of Web Services: SOAP and REST An Overview of Web Services: SOAP and REST
An Overview of Web Services: SOAP and REST Ram Awadh Prasad, PMP
 
Introduction to Stream Processing
Introduction to Stream ProcessingIntroduction to Stream Processing
Introduction to Stream ProcessingGuido Schmutz
 
The business today - PowerApps, Power BI y Microsoft Flow
The business today - PowerApps, Power BI y Microsoft FlowThe business today - PowerApps, Power BI y Microsoft Flow
The business today - PowerApps, Power BI y Microsoft FlowJuan Fabian
 
Scaling Twitter
Scaling TwitterScaling Twitter
Scaling TwitterBlaine
 
Simplified Machine Learning Architecture with an Event Streaming Platform (Ap...
Simplified Machine Learning Architecture with an Event Streaming Platform (Ap...Simplified Machine Learning Architecture with an Event Streaming Platform (Ap...
Simplified Machine Learning Architecture with an Event Streaming Platform (Ap...Kai Wähner
 
Container Orchestration
Container OrchestrationContainer Orchestration
Container Orchestrationdfilppi
 
Big Data & Analytics - Use Cases in Mobile, E-commerce, Media and more
Big Data & Analytics - Use Cases in Mobile, E-commerce, Media and moreBig Data & Analytics - Use Cases in Mobile, E-commerce, Media and more
Big Data & Analytics - Use Cases in Mobile, E-commerce, Media and moreAmazon Web Services
 
HITCON駭客戰隊與CTF經驗分享
HITCON駭客戰隊與CTF經驗分享HITCON駭客戰隊與CTF經驗分享
HITCON駭客戰隊與CTF經驗分享Alan Lee
 
Patterns of Enterprise Application Architecture (by example)
Patterns of Enterprise Application Architecture (by example)Patterns of Enterprise Application Architecture (by example)
Patterns of Enterprise Application Architecture (by example)Paulo Gandra de Sousa
 
What, Why and How of Governance in RPA
What, Why and How of Governance  in RPAWhat, Why and How of Governance  in RPA
What, Why and How of Governance in RPAMohit Sharma (GAICD)
 

What's hot (20)

Importance of Solution Architecture in Automation
Importance of Solution Architecture in AutomationImportance of Solution Architecture in Automation
Importance of Solution Architecture in Automation
 
Hadoop Administration pdf
Hadoop Administration pdfHadoop Administration pdf
Hadoop Administration pdf
 
Web application framework
Web application frameworkWeb application framework
Web application framework
 
Overview SQL Server 2019
Overview SQL Server 2019Overview SQL Server 2019
Overview SQL Server 2019
 
Scalable and Available, Patterns for Success
Scalable and Available, Patterns for SuccessScalable and Available, Patterns for Success
Scalable and Available, Patterns for Success
 
Introducing the SnapLogic Integration Cloud
Introducing the SnapLogic Integration CloudIntroducing the SnapLogic Integration Cloud
Introducing the SnapLogic Integration Cloud
 
UiPath vs Automation Anywhere Comparison
UiPath vs Automation Anywhere ComparisonUiPath vs Automation Anywhere Comparison
UiPath vs Automation Anywhere Comparison
 
An Overview of Web Services: SOAP and REST
An Overview of Web Services: SOAP and REST An Overview of Web Services: SOAP and REST
An Overview of Web Services: SOAP and REST
 
Introduction to Stream Processing
Introduction to Stream ProcessingIntroduction to Stream Processing
Introduction to Stream Processing
 
The business today - PowerApps, Power BI y Microsoft Flow
The business today - PowerApps, Power BI y Microsoft FlowThe business today - PowerApps, Power BI y Microsoft Flow
The business today - PowerApps, Power BI y Microsoft Flow
 
Hadoop Seminar Report
Hadoop Seminar ReportHadoop Seminar Report
Hadoop Seminar Report
 
Scaling Twitter
Scaling TwitterScaling Twitter
Scaling Twitter
 
Fluent Bit
Fluent BitFluent Bit
Fluent Bit
 
Simplified Machine Learning Architecture with an Event Streaming Platform (Ap...
Simplified Machine Learning Architecture with an Event Streaming Platform (Ap...Simplified Machine Learning Architecture with an Event Streaming Platform (Ap...
Simplified Machine Learning Architecture with an Event Streaming Platform (Ap...
 
Container Orchestration
Container OrchestrationContainer Orchestration
Container Orchestration
 
Introduction to Hadoop
Introduction to HadoopIntroduction to Hadoop
Introduction to Hadoop
 
Big Data & Analytics - Use Cases in Mobile, E-commerce, Media and more
Big Data & Analytics - Use Cases in Mobile, E-commerce, Media and moreBig Data & Analytics - Use Cases in Mobile, E-commerce, Media and more
Big Data & Analytics - Use Cases in Mobile, E-commerce, Media and more
 
HITCON駭客戰隊與CTF經驗分享
HITCON駭客戰隊與CTF經驗分享HITCON駭客戰隊與CTF經驗分享
HITCON駭客戰隊與CTF經驗分享
 
Patterns of Enterprise Application Architecture (by example)
Patterns of Enterprise Application Architecture (by example)Patterns of Enterprise Application Architecture (by example)
Patterns of Enterprise Application Architecture (by example)
 
What, Why and How of Governance in RPA
What, Why and How of Governance  in RPAWhat, Why and How of Governance  in RPA
What, Why and How of Governance in RPA
 

Similar to Getting started with Laravel & Elasticsearch

Getting Started with Elasticsearch
Getting Started with ElasticsearchGetting Started with Elasticsearch
Getting Started with ElasticsearchAlibaba Cloud
 
Modernizing WordPress Search with Elasticsearch
Modernizing WordPress Search with ElasticsearchModernizing WordPress Search with Elasticsearch
Modernizing WordPress Search with ElasticsearchTaylor Lovett
 
Devnexus 2018
Devnexus 2018Devnexus 2018
Devnexus 2018Roy Russo
 
06 integrate elasticsearch
06 integrate elasticsearch06 integrate elasticsearch
06 integrate elasticsearchErhwen Kuo
 
Dev nexus 2017
Dev nexus 2017Dev nexus 2017
Dev nexus 2017Roy Russo
 
Episerver and search engines
Episerver and search enginesEpiserver and search engines
Episerver and search enginesMikko Huilaja
 
[2D1]Elasticsearch 성능 최적화
[2D1]Elasticsearch 성능 최적화[2D1]Elasticsearch 성능 최적화
[2D1]Elasticsearch 성능 최적화NAVER D2
 
[2 d1] elasticsearch 성능 최적화
[2 d1] elasticsearch 성능 최적화[2 d1] elasticsearch 성능 최적화
[2 d1] elasticsearch 성능 최적화Henry Jeong
 
Elastic & Azure & Episever, Case Evira
Elastic & Azure & Episever, Case EviraElastic & Azure & Episever, Case Evira
Elastic & Azure & Episever, Case EviraMikko Huilaja
 
Where Is My Data - ILTAM Session
Where Is My Data - ILTAM SessionWhere Is My Data - ILTAM Session
Where Is My Data - ILTAM SessionTamir Dresher
 
Elasticsearch for Autosuggest in Clojure at Workframe
Elasticsearch for Autosuggest in Clojure at WorkframeElasticsearch for Autosuggest in Clojure at Workframe
Elasticsearch for Autosuggest in Clojure at WorkframeBrian Ballantine
 
(BDT209) Launch: Amazon Elasticsearch For Real-Time Data Analytics
(BDT209) Launch: Amazon Elasticsearch For Real-Time Data Analytics(BDT209) Launch: Amazon Elasticsearch For Real-Time Data Analytics
(BDT209) Launch: Amazon Elasticsearch For Real-Time Data AnalyticsAmazon Web Services
 
Elk presentation1#3
Elk presentation1#3Elk presentation1#3
Elk presentation1#3uzzal basak
 
Qui Quaerit, Reperit. AWS Elasticsearch in Action
Qui Quaerit, Reperit. AWS Elasticsearch in ActionQui Quaerit, Reperit. AWS Elasticsearch in Action
Qui Quaerit, Reperit. AWS Elasticsearch in ActionGlobalLogic Ukraine
 
Using ElasticSearch as a fast, flexible, and scalable solution to search occu...
Using ElasticSearch as a fast, flexible, and scalable solution to search occu...Using ElasticSearch as a fast, flexible, and scalable solution to search occu...
Using ElasticSearch as a fast, flexible, and scalable solution to search occu...kristgen
 
AWS October Webinar Series - Introducing Amazon Elasticsearch Service
AWS October Webinar Series - Introducing Amazon Elasticsearch ServiceAWS October Webinar Series - Introducing Amazon Elasticsearch Service
AWS October Webinar Series - Introducing Amazon Elasticsearch ServiceAmazon Web Services
 
Machine Learning with ML.NET and Azure - Andy Cross
Machine Learning with ML.NET and Azure - Andy CrossMachine Learning with ML.NET and Azure - Andy Cross
Machine Learning with ML.NET and Azure - Andy CrossAndrew Flatters
 
Optimizing elastic search on google compute engine
Optimizing elastic search on google compute engineOptimizing elastic search on google compute engine
Optimizing elastic search on google compute engineBhuvaneshwaran R
 
Running ElasticSearch on Google Compute Engine in Production
Running ElasticSearch on Google Compute Engine in ProductionRunning ElasticSearch on Google Compute Engine in Production
Running ElasticSearch on Google Compute Engine in ProductionSearce Inc
 
Test driving Azure Search and DocumentDB
Test driving Azure Search and DocumentDBTest driving Azure Search and DocumentDB
Test driving Azure Search and DocumentDBAndrew Siemer
 

Similar to Getting started with Laravel & Elasticsearch (20)

Getting Started with Elasticsearch
Getting Started with ElasticsearchGetting Started with Elasticsearch
Getting Started with Elasticsearch
 
Modernizing WordPress Search with Elasticsearch
Modernizing WordPress Search with ElasticsearchModernizing WordPress Search with Elasticsearch
Modernizing WordPress Search with Elasticsearch
 
Devnexus 2018
Devnexus 2018Devnexus 2018
Devnexus 2018
 
06 integrate elasticsearch
06 integrate elasticsearch06 integrate elasticsearch
06 integrate elasticsearch
 
Dev nexus 2017
Dev nexus 2017Dev nexus 2017
Dev nexus 2017
 
Episerver and search engines
Episerver and search enginesEpiserver and search engines
Episerver and search engines
 
[2D1]Elasticsearch 성능 최적화
[2D1]Elasticsearch 성능 최적화[2D1]Elasticsearch 성능 최적화
[2D1]Elasticsearch 성능 최적화
 
[2 d1] elasticsearch 성능 최적화
[2 d1] elasticsearch 성능 최적화[2 d1] elasticsearch 성능 최적화
[2 d1] elasticsearch 성능 최적화
 
Elastic & Azure & Episever, Case Evira
Elastic & Azure & Episever, Case EviraElastic & Azure & Episever, Case Evira
Elastic & Azure & Episever, Case Evira
 
Where Is My Data - ILTAM Session
Where Is My Data - ILTAM SessionWhere Is My Data - ILTAM Session
Where Is My Data - ILTAM Session
 
Elasticsearch for Autosuggest in Clojure at Workframe
Elasticsearch for Autosuggest in Clojure at WorkframeElasticsearch for Autosuggest in Clojure at Workframe
Elasticsearch for Autosuggest in Clojure at Workframe
 
(BDT209) Launch: Amazon Elasticsearch For Real-Time Data Analytics
(BDT209) Launch: Amazon Elasticsearch For Real-Time Data Analytics(BDT209) Launch: Amazon Elasticsearch For Real-Time Data Analytics
(BDT209) Launch: Amazon Elasticsearch For Real-Time Data Analytics
 
Elk presentation1#3
Elk presentation1#3Elk presentation1#3
Elk presentation1#3
 
Qui Quaerit, Reperit. AWS Elasticsearch in Action
Qui Quaerit, Reperit. AWS Elasticsearch in ActionQui Quaerit, Reperit. AWS Elasticsearch in Action
Qui Quaerit, Reperit. AWS Elasticsearch in Action
 
Using ElasticSearch as a fast, flexible, and scalable solution to search occu...
Using ElasticSearch as a fast, flexible, and scalable solution to search occu...Using ElasticSearch as a fast, flexible, and scalable solution to search occu...
Using ElasticSearch as a fast, flexible, and scalable solution to search occu...
 
AWS October Webinar Series - Introducing Amazon Elasticsearch Service
AWS October Webinar Series - Introducing Amazon Elasticsearch ServiceAWS October Webinar Series - Introducing Amazon Elasticsearch Service
AWS October Webinar Series - Introducing Amazon Elasticsearch Service
 
Machine Learning with ML.NET and Azure - Andy Cross
Machine Learning with ML.NET and Azure - Andy CrossMachine Learning with ML.NET and Azure - Andy Cross
Machine Learning with ML.NET and Azure - Andy Cross
 
Optimizing elastic search on google compute engine
Optimizing elastic search on google compute engineOptimizing elastic search on google compute engine
Optimizing elastic search on google compute engine
 
Running ElasticSearch on Google Compute Engine in Production
Running ElasticSearch on Google Compute Engine in ProductionRunning ElasticSearch on Google Compute Engine in Production
Running ElasticSearch on Google Compute Engine in Production
 
Test driving Azure Search and DocumentDB
Test driving Azure Search and DocumentDBTest driving Azure Search and DocumentDB
Test driving Azure Search and DocumentDB
 

Recently uploaded

Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.soniya singh
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
INDIVIDUAL ASSIGNMENT #3 CBG, PRESENTATION.
INDIVIDUAL ASSIGNMENT #3 CBG, PRESENTATION.INDIVIDUAL ASSIGNMENT #3 CBG, PRESENTATION.
INDIVIDUAL ASSIGNMENT #3 CBG, PRESENTATION.CarlotaBedoya1
 
CALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service Online
CALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service OnlineCALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service Online
CALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service Onlineanilsa9823
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...APNIC
 
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Call Girls in Nagpur High Profile
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girladitipandeya
 
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663Call Girls Mumbai
 
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...Neha Pandey
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)Delhi Call girls
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)Damian Radcliffe
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersDamian Radcliffe
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Servicesexy call girls service in goa
 

Recently uploaded (20)

Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Sarai Rohilla Escort Service Delhi N.C.R.
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
 
@9999965857 🫦 Sexy Desi Call Girls Laxmi Nagar 💓 High Profile Escorts Delhi 🫶
@9999965857 🫦 Sexy Desi Call Girls Laxmi Nagar 💓 High Profile Escorts Delhi 🫶@9999965857 🫦 Sexy Desi Call Girls Laxmi Nagar 💓 High Profile Escorts Delhi 🫶
@9999965857 🫦 Sexy Desi Call Girls Laxmi Nagar 💓 High Profile Escorts Delhi 🫶
 
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
 
Russian Call Girls in %(+971524965298 )# Call Girls in Dubai
Russian Call Girls in %(+971524965298  )#  Call Girls in DubaiRussian Call Girls in %(+971524965298  )#  Call Girls in Dubai
Russian Call Girls in %(+971524965298 )# Call Girls in Dubai
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
 
INDIVIDUAL ASSIGNMENT #3 CBG, PRESENTATION.
INDIVIDUAL ASSIGNMENT #3 CBG, PRESENTATION.INDIVIDUAL ASSIGNMENT #3 CBG, PRESENTATION.
INDIVIDUAL ASSIGNMENT #3 CBG, PRESENTATION.
 
CALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service Online
CALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service OnlineCALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service Online
CALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service Online
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
 
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
 
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
 
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
 
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
 

Getting started with Laravel & Elasticsearch

  • 1. Laravel and ElasticSearch Getting started building a powerful search engine Peter Steenbergen
  • 3. What I am about to cover • Benefits of ElasticSearch • ElasticSearch Basics • Examples of Searchengines • Installing the tools • Analyzing and feeding the data • Searching with Laravel and ElasticSearch through VueJS
  • 4. What I do NOT cover • Type of queries • Analyzers • Filters • Percolator • Internals of Elasticsearch (Lucene Index) • Talk of Elze Kool - GroningenPHP https://bitbucket.org/elzekool/talk-solr-elasticsearch-internals/src The internals will cover how a score is determined in the background.
  • 6. What is a “powerful search”? • Fast Search in milliseconds, not in seconds. • Relevant If you search for a Hotel in California, don’t return Hotels in Groningen. Or a black Audi, you don’t want to see a white Peugeot 107. • Scalable If your data grows, then you need more resources. It could mean by vertical scaling or (better) horizontal scaling of capacity.
  • 7. MySQL Drawbacks for searching through text • LIKE %% • Fast? No, try searching for millions of records with multiple joins to combine all the information needed. • Relevant? No, Try search for “PHP programmeur” or “PHP developer”, or “Audi A8 zwart” or “zwarte Audi A8“. • Scalable? Could be, but with much hassle in configurations in production and backing up. • Facets / Counts – How many Audi’s? How many black cars? Takes multiple query’s for the calculation of those counts. NB: FULL TEXT not noted here, gave a bit better result but not great.
  • 9. The Elastic Stack – formerly known as ELK stack
  • 10. Usage of the Elastic stack • Time-series data Log files, searched queries, view count of document • Insights in your data • Machine-Learning capabilities • Reversal of search queries with percolator (storing search queries) • Zero-downtime* index swapping Last 7 days, Last 30 days, or products => products-20180327
  • 11. Components of ElasticSearch • Node Instance of ElasticSearch. • Cluster One or more nodes that work together to serve the same data and API requests. • Document A piece of stored data you want to search for. (MySQL Row) • Index A collection of documents that have somewhat similar characteristics. (MySQL Table)
  • 12.
  • 13.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20. Lets build that coolblue page!
  • 21. First up: installation of the following tools • MySQL (ElasticSearch does not support transactions!) • ElasticSearch • Laravel • VueJS / VueX
  • 22. Setting up / Starting MySQL on OSX • Default credentials User: root Password: <empty> Port: 3301 > Now create a Database called “coolshop”
  • 23. Installing laravel • We use composer for the installation • If you don’t have it, get it from here: https://getcomposer.org Run the following in your terminal: Laravel Installer:
  • 24. Setting up / Starting ElasticSearch on OSX Settings / name, cluster_name: /usr/local/etc/elasticsearch/elasticsearch.yml Java Virtual Machine options: /usr/local/etc/elasticsearch/jvm.options -Xms2g => -Xms256m -Xmx2g => -Xmx256m Maximum of 32GB per node is recommended NB: 256m is for small dev boxes and not production!!
  • 25. Installing additional packages • ElasticSearch composer package • Guzzle (optional) • VueX for using Store • Setup default FrontEnd scaffold
  • 26. Creating the Service Provider and Config • config/elasticsearch.php
  • 27. Setting the ElasticSearch ServiceProvider
  • 28. Register the ElasticSearch ServiceProvider NB: config/app.php
  • 30. Testing the setup – we go Ping-Pong
  • 32. Analyzing the data • Image • AwardImage • Title • Rating • ReviewCount • ProductOptions • Price • PriceSecondChange • InStock • TypeRouter • Brand • CoolbluesChoice • AdministratorOptions
  • 34. Analyzing the data • Image => Keyword • AwardImage => Keyword • Title => Text • Rating => Float • ReviewCount => Integer • ProductOptions => Text • Price => Float • PriceSecondChange => Float • InStock => Boolean • TypeRouter => Keyword • Brand => Keyword • CoolbluesChoice => Keyword • AdministratorOptions => Keyword
  • 35. Put the mapping in ElasticSearch Kibana is a no-brainer for this. It has an own Dev Console. Or with the PHP Client of ElasticSearch.
  • 36. Lets inject some data in the Elasticsearch
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44. Compile the front-end In the console run: • Development npm run dev one-time build npm run watch listener for changes • Production npm run production
  • 46. Adding the endpoint – api.php
  • 47.
  • 51.
  • 52. Questions? Twitter / Github: @petericebear Email: psteenbergen@gmail.com Blog: http://petericebear.github.io/ COUPONCODE: ELASTICMEETING 50% OFF - FIRST MONTH – Hosting sales@virtio.nl

Editor's Notes

  1. Inleiding - Wat ga ik behandelen in deze presentatie. Globale overview..
  2. Inleiding - Wat ga ik behandelen in deze presentatie. Globale overview..
  3. Inleiding - Wat ga ik behandelen in deze presentatie. Globale overview..
  4. Inleiding - Wat ga ik behandelen in deze presentatie. Globale overview..
  5. Inleiding - Wat ga ik behandelen in deze presentatie. Globale overview..