SlideShare a Scribd company logo
Laravel and SOLR
How to build a powerful search combination
- Peter Steenbergen
Who am I?
What I am about to cover
• The meaning of the term powerful
• MySQL Drawbacks
• Why SOLR
• Usage of tools
• Setting up / starting with SOLR Server
• Starting with SOLR
• Integrate SOLR with Laravel
• Laravel and SOLR Searching
What I do NOT cover
• Front-End implementation
• No Angular, VueJS or React integration (recommend VueJS though)
• Authentication
• Internals of SOLR / Elasticsearch
• Talk of Elze Kool in the summer
https://bitbucket.org/elzekool/talk-solr-elasticsearch-internals/src
What do I mean by “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.
• 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.
Why I started with SOLR
• Providers send vehicle updates daily between 06:00 and 22:00
more than 25.000 vehicles are changed throughout the day.
• Encountered MySQL limitations
• Speed – With JOINS for additional data.
• Table LOCK during write actions.
• Relevancy was not great.
• A temporary solution was creating a flat table, that contains all the
data to be shown at the searchoverview pages.
Why I started with SOLR
Thats why I started with SOLR
After changing the search from MySQL to SOLR
• Search time decreased from seconds to milliseconds.
• Relevancy went up since the search internals work differently.
• Costs went down, less resources needed.
• Organic traffic went up since the improved loading times.
• Visitors viewed more paged since better performance.
Statistics: 17.k daily visitors, 160k vehicles, 25k-30k changes
Next up: coverage of the following tools
• MySQL (for main storage)
• SOLR
• Docker (Optionaly)
• Laravel
Let the fun stuff begin!
Setting up / Starting MySQL on OSX
• Default credentials
User: root
Password: <empty>
Port: 3301
Setting up / starting SOLR on OSX
https://github.com/petericebear/solr-configsets
http://brew.sh
Setting up / starting SOLR with docker
https://github.com/petericebear/solr-configsets
Where to begin with SOLR - schema.xml
• Fields
1. Type
What kind of field is it?
2. Indexed
Do you want to search in it?
3. Stored
Return the data in results?
4. Multivalued
Can it contain more than 1 value?
• Fieldtypes
• String
• Integer
• Float
• Boolean
• Date
• Location (Latitude/Longitude)
• ..
Where to begin with SOLR - additional
Copy contents of a field to another field
Add analyzer to a fieldtype – remove stop words “de, het, een, op, in, naar” etc.
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:
Communicating with SOLR
• https://github.com/solariumphp/solarium
• Over 1.2million downloads
Run the following in your terminal:
Adding a configuration
• config/solarium.php
Add ServiceProvider
When the application needs the SolariumClient
class, it will inject the created configuration to
its Client. This way you will never have to touch
the code when something changes to the server
or core setting.
Notice the $defer setting. When true this
ServiceProvider only will autoload when the
Client is needed and NOT with evry request.
Activate ServiceProvider
To make use of the new ServiceProvider in your application you must
add it in config/app.php and add it to the list of providers.
Testing the connection with SOLR
Adding contents
to SOLR
Can contain single or multiple documents. Basic
object for setting the data.
Removing a document from SOLR
Basic search with SOLR
Facets query
inStock possible values
True [200]
False [100]
Combine for API endpoint
More examples
• https://github.com/solariumphp/solarium/tree/master/examples
• Well documented examples
• http://petericebear.github.io/
• Personal blog with more SOLR integrations
Questions?
Twitter / Github: @petericebear
Email: psteenbergen@gmail.com
COUPONCODE: SOLRMEETING
50% OFF - FIRST MONTH
info@virtio.nl

More Related Content

What's hot

Spark introduction and architecture
Spark introduction and architectureSpark introduction and architecture
Spark introduction and architecture
Sohil Jain
 
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...
Databricks
 
Kafka on ZFS: Better Living Through Filesystems
Kafka on ZFS: Better Living Through Filesystems Kafka on ZFS: Better Living Through Filesystems
Kafka on ZFS: Better Living Through Filesystems
confluent
 
Vectorized Query Execution in Apache Spark at Facebook
Vectorized Query Execution in Apache Spark at FacebookVectorized Query Execution in Apache Spark at Facebook
Vectorized Query Execution in Apache Spark at Facebook
Databricks
 
ORC File - Optimizing Your Big Data
ORC File - Optimizing Your Big DataORC File - Optimizing Your Big Data
ORC File - Optimizing Your Big Data
DataWorks Summit
 
Elastic - ELK, Logstash & Kibana
Elastic - ELK, Logstash & KibanaElastic - ELK, Logstash & Kibana
Elastic - ELK, Logstash & Kibana
SpringPeople
 
Internal Hive
Internal HiveInternal Hive
Internal Hive
Recruit Technologies
 
Encrypting and Protecting Your Data in Neo4j(Jeff_Tallman).pptx
Encrypting and Protecting Your Data in Neo4j(Jeff_Tallman).pptxEncrypting and Protecting Your Data in Neo4j(Jeff_Tallman).pptx
Encrypting and Protecting Your Data in Neo4j(Jeff_Tallman).pptx
Neo4j
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to Redis
Arnab Mitra
 
Benchmarking Oracle I/O Performance with Orion by Alex Gorbachev
Benchmarking Oracle I/O Performance with Orion by Alex GorbachevBenchmarking Oracle I/O Performance with Orion by Alex Gorbachev
Benchmarking Oracle I/O Performance with Orion by Alex GorbachevAlex Gorbachev
 
Training Series - Build A Routing Web Application With OpenStreetMap, Neo4j, ...
Training Series - Build A Routing Web Application With OpenStreetMap, Neo4j, ...Training Series - Build A Routing Web Application With OpenStreetMap, Neo4j, ...
Training Series - Build A Routing Web Application With OpenStreetMap, Neo4j, ...
Neo4j
 
[2012 CodeEngn Conference 06] beist - Everyone has his or her own fuzzer
[2012 CodeEngn Conference 06] beist - Everyone has his or her own fuzzer[2012 CodeEngn Conference 06] beist - Everyone has his or her own fuzzer
[2012 CodeEngn Conference 06] beist - Everyone has his or her own fuzzer
GangSeok Lee
 
Standing on the Shoulders of Open-Source Giants: The Serverless Realtime Lake...
Standing on the Shoulders of Open-Source Giants: The Serverless Realtime Lake...Standing on the Shoulders of Open-Source Giants: The Serverless Realtime Lake...
Standing on the Shoulders of Open-Source Giants: The Serverless Realtime Lake...
HostedbyConfluent
 
How to overcome mysterious problems caused by large and multi-tenancy Hadoop ...
How to overcome mysterious problems caused by large and multi-tenancy Hadoop ...How to overcome mysterious problems caused by large and multi-tenancy Hadoop ...
How to overcome mysterious problems caused by large and multi-tenancy Hadoop ...
DataWorks Summit/Hadoop Summit
 
검색엔진이 데이터를 다루는 법 김종민
검색엔진이 데이터를 다루는 법 김종민검색엔진이 데이터를 다루는 법 김종민
검색엔진이 데이터를 다루는 법 김종민
종민 김
 
MongoDB vs. Postgres Benchmarks
MongoDB vs. Postgres Benchmarks MongoDB vs. Postgres Benchmarks
MongoDB vs. Postgres Benchmarks
EDB
 
개발을잘하고싶어요-네이버랩스 송기선님
개발을잘하고싶어요-네이버랩스 송기선님개발을잘하고싶어요-네이버랩스 송기선님
개발을잘하고싶어요-네이버랩스 송기선님
NAVER D2
 
SQL Server のインデックス設計
SQL Server のインデックス設計SQL Server のインデックス設計
SQL Server のインデックス設計
Koji Yamada
 
Elasticsearch in Netflix
Elasticsearch in NetflixElasticsearch in Netflix
Elasticsearch in Netflix
Danny Yuan
 
SOS: Optimizing Shuffle I/O with Brian Cho and Ergin Seyfe
SOS: Optimizing Shuffle I/O with Brian Cho and Ergin SeyfeSOS: Optimizing Shuffle I/O with Brian Cho and Ergin Seyfe
SOS: Optimizing Shuffle I/O with Brian Cho and Ergin Seyfe
Databricks
 

What's hot (20)

Spark introduction and architecture
Spark introduction and architectureSpark introduction and architecture
Spark introduction and architecture
 
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...
 
Kafka on ZFS: Better Living Through Filesystems
Kafka on ZFS: Better Living Through Filesystems Kafka on ZFS: Better Living Through Filesystems
Kafka on ZFS: Better Living Through Filesystems
 
Vectorized Query Execution in Apache Spark at Facebook
Vectorized Query Execution in Apache Spark at FacebookVectorized Query Execution in Apache Spark at Facebook
Vectorized Query Execution in Apache Spark at Facebook
 
ORC File - Optimizing Your Big Data
ORC File - Optimizing Your Big DataORC File - Optimizing Your Big Data
ORC File - Optimizing Your Big Data
 
Elastic - ELK, Logstash & Kibana
Elastic - ELK, Logstash & KibanaElastic - ELK, Logstash & Kibana
Elastic - ELK, Logstash & Kibana
 
Internal Hive
Internal HiveInternal Hive
Internal Hive
 
Encrypting and Protecting Your Data in Neo4j(Jeff_Tallman).pptx
Encrypting and Protecting Your Data in Neo4j(Jeff_Tallman).pptxEncrypting and Protecting Your Data in Neo4j(Jeff_Tallman).pptx
Encrypting and Protecting Your Data in Neo4j(Jeff_Tallman).pptx
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to Redis
 
Benchmarking Oracle I/O Performance with Orion by Alex Gorbachev
Benchmarking Oracle I/O Performance with Orion by Alex GorbachevBenchmarking Oracle I/O Performance with Orion by Alex Gorbachev
Benchmarking Oracle I/O Performance with Orion by Alex Gorbachev
 
Training Series - Build A Routing Web Application With OpenStreetMap, Neo4j, ...
Training Series - Build A Routing Web Application With OpenStreetMap, Neo4j, ...Training Series - Build A Routing Web Application With OpenStreetMap, Neo4j, ...
Training Series - Build A Routing Web Application With OpenStreetMap, Neo4j, ...
 
[2012 CodeEngn Conference 06] beist - Everyone has his or her own fuzzer
[2012 CodeEngn Conference 06] beist - Everyone has his or her own fuzzer[2012 CodeEngn Conference 06] beist - Everyone has his or her own fuzzer
[2012 CodeEngn Conference 06] beist - Everyone has his or her own fuzzer
 
Standing on the Shoulders of Open-Source Giants: The Serverless Realtime Lake...
Standing on the Shoulders of Open-Source Giants: The Serverless Realtime Lake...Standing on the Shoulders of Open-Source Giants: The Serverless Realtime Lake...
Standing on the Shoulders of Open-Source Giants: The Serverless Realtime Lake...
 
How to overcome mysterious problems caused by large and multi-tenancy Hadoop ...
How to overcome mysterious problems caused by large and multi-tenancy Hadoop ...How to overcome mysterious problems caused by large and multi-tenancy Hadoop ...
How to overcome mysterious problems caused by large and multi-tenancy Hadoop ...
 
검색엔진이 데이터를 다루는 법 김종민
검색엔진이 데이터를 다루는 법 김종민검색엔진이 데이터를 다루는 법 김종민
검색엔진이 데이터를 다루는 법 김종민
 
MongoDB vs. Postgres Benchmarks
MongoDB vs. Postgres Benchmarks MongoDB vs. Postgres Benchmarks
MongoDB vs. Postgres Benchmarks
 
개발을잘하고싶어요-네이버랩스 송기선님
개발을잘하고싶어요-네이버랩스 송기선님개발을잘하고싶어요-네이버랩스 송기선님
개발을잘하고싶어요-네이버랩스 송기선님
 
SQL Server のインデックス設計
SQL Server のインデックス設計SQL Server のインデックス設計
SQL Server のインデックス設計
 
Elasticsearch in Netflix
Elasticsearch in NetflixElasticsearch in Netflix
Elasticsearch in Netflix
 
SOS: Optimizing Shuffle I/O with Brian Cho and Ergin Seyfe
SOS: Optimizing Shuffle I/O with Brian Cho and Ergin SeyfeSOS: Optimizing Shuffle I/O with Brian Cho and Ergin Seyfe
SOS: Optimizing Shuffle I/O with Brian Cho and Ergin Seyfe
 

Viewers also liked

Secciones estilos encabezados
Secciones estilos encabezadosSecciones estilos encabezados
Secciones estilos encabezados
guisselle guevara
 
Laravel, the right way - PHPConference 2016
Laravel, the right way - PHPConference 2016Laravel, the right way - PHPConference 2016
Laravel, the right way - PHPConference 2016
Matheus Marabesi
 
Testing and TDD - Laravel and Express Examples
Testing and TDD - Laravel and Express ExamplesTesting and TDD - Laravel and Express Examples
Testing and TDD - Laravel and Express Examples
Dragos Strugar
 
Datech2014 - Cataloguing for a Billion Word Library of Greek and Latin
Datech2014 - Cataloguing for a Billion Word Library of Greek and LatinDatech2014 - Cataloguing for a Billion Word Library of Greek and Latin
Datech2014 - Cataloguing for a Billion Word Library of Greek and Latin
IMPACT Centre of Competence
 
Library of Congress New Bibliographic Framework - What is it?
Library of Congress New Bibliographic Framework - What is it?Library of Congress New Bibliographic Framework - What is it?
Library of Congress New Bibliographic Framework - What is it?
Lukas Koster
 
Cataloguing in the Real World
Cataloguing in the Real WorldCataloguing in the Real World
Cataloguing in the Real WorldEmily Porta
 
Censorship by Omission: Closing off fiction in cataloguing
Censorship by Omission: Closing off fiction in cataloguingCensorship by Omission: Closing off fiction in cataloguing
Censorship by Omission: Closing off fiction in cataloguing
National Library of Australia
 
The Future of Library Cataloguing
The Future of Library CataloguingThe Future of Library Cataloguing
The Future of Library Cataloguing
Kathryne Dunlap
 
Day in the life of a data librarian [presentation for ANU 23Things group]
Day in the life of a data librarian [presentation for ANU 23Things group]Day in the life of a data librarian [presentation for ANU 23Things group]
Day in the life of a data librarian [presentation for ANU 23Things group]
Jane Frazier
 
Library Carpentry: software skills training for library professionals, Chart...
 Library Carpentry: software skills training for library professionals, Chart... Library Carpentry: software skills training for library professionals, Chart...
Library Carpentry: software skills training for library professionals, Chart...
James Baker
 
Building a Search Engine Using Lucene
Building a Search Engine Using LuceneBuilding a Search Engine Using Lucene
Building a Search Engine Using Lucene
Abdelrahman Othman Helal
 
Microdata cataloging tool (nada)
Microdata cataloging tool (nada)Microdata cataloging tool (nada)
Microdata cataloging tool (nada)
Divya Vyas
 
Computer Science Library Training
Computer Science Library TrainingComputer Science Library Training
Computer Science Library Training
pvhead123
 
Presentacion mineria
Presentacion mineriaPresentacion mineria
Presentacion mineriaviktor93
 
Reactive Laravel - Laravel meetup Groningen
Reactive Laravel - Laravel meetup GroningenReactive Laravel - Laravel meetup Groningen
Reactive Laravel - Laravel meetup Groningen
Jasper Staats
 
Taller de catalogación Linked Open Data y RDA: posibilidades y desafíos. Prim...
Taller de catalogación Linked Open Data y RDA: posibilidades y desafíos. Prim...Taller de catalogación Linked Open Data y RDA: posibilidades y desafíos. Prim...
Taller de catalogación Linked Open Data y RDA: posibilidades y desafíos. Prim...
DIGIBIS
 
(Have a) rest with Laravel
(Have a) rest with Laravel(Have a) rest with Laravel
(Have a) rest with Laravel
Commit University
 
Presentation laravel 5 4
Presentation laravel 5 4Presentation laravel 5 4
Presentation laravel 5 4
Christen Gjølbye Christensen
 
Really Simple Document Management with Alfresco
Really Simple Document Management with AlfrescoReally Simple Document Management with Alfresco
Really Simple Document Management with Alfresco
Alfresco Software
 
RDA y el proceso de catalogación
RDA y el proceso de catalogaciónRDA y el proceso de catalogación
RDA y el proceso de catalogación
Embajada de EEUU en Argentina
 

Viewers also liked (20)

Secciones estilos encabezados
Secciones estilos encabezadosSecciones estilos encabezados
Secciones estilos encabezados
 
Laravel, the right way - PHPConference 2016
Laravel, the right way - PHPConference 2016Laravel, the right way - PHPConference 2016
Laravel, the right way - PHPConference 2016
 
Testing and TDD - Laravel and Express Examples
Testing and TDD - Laravel and Express ExamplesTesting and TDD - Laravel and Express Examples
Testing and TDD - Laravel and Express Examples
 
Datech2014 - Cataloguing for a Billion Word Library of Greek and Latin
Datech2014 - Cataloguing for a Billion Word Library of Greek and LatinDatech2014 - Cataloguing for a Billion Word Library of Greek and Latin
Datech2014 - Cataloguing for a Billion Word Library of Greek and Latin
 
Library of Congress New Bibliographic Framework - What is it?
Library of Congress New Bibliographic Framework - What is it?Library of Congress New Bibliographic Framework - What is it?
Library of Congress New Bibliographic Framework - What is it?
 
Cataloguing in the Real World
Cataloguing in the Real WorldCataloguing in the Real World
Cataloguing in the Real World
 
Censorship by Omission: Closing off fiction in cataloguing
Censorship by Omission: Closing off fiction in cataloguingCensorship by Omission: Closing off fiction in cataloguing
Censorship by Omission: Closing off fiction in cataloguing
 
The Future of Library Cataloguing
The Future of Library CataloguingThe Future of Library Cataloguing
The Future of Library Cataloguing
 
Day in the life of a data librarian [presentation for ANU 23Things group]
Day in the life of a data librarian [presentation for ANU 23Things group]Day in the life of a data librarian [presentation for ANU 23Things group]
Day in the life of a data librarian [presentation for ANU 23Things group]
 
Library Carpentry: software skills training for library professionals, Chart...
 Library Carpentry: software skills training for library professionals, Chart... Library Carpentry: software skills training for library professionals, Chart...
Library Carpentry: software skills training for library professionals, Chart...
 
Building a Search Engine Using Lucene
Building a Search Engine Using LuceneBuilding a Search Engine Using Lucene
Building a Search Engine Using Lucene
 
Microdata cataloging tool (nada)
Microdata cataloging tool (nada)Microdata cataloging tool (nada)
Microdata cataloging tool (nada)
 
Computer Science Library Training
Computer Science Library TrainingComputer Science Library Training
Computer Science Library Training
 
Presentacion mineria
Presentacion mineriaPresentacion mineria
Presentacion mineria
 
Reactive Laravel - Laravel meetup Groningen
Reactive Laravel - Laravel meetup GroningenReactive Laravel - Laravel meetup Groningen
Reactive Laravel - Laravel meetup Groningen
 
Taller de catalogación Linked Open Data y RDA: posibilidades y desafíos. Prim...
Taller de catalogación Linked Open Data y RDA: posibilidades y desafíos. Prim...Taller de catalogación Linked Open Data y RDA: posibilidades y desafíos. Prim...
Taller de catalogación Linked Open Data y RDA: posibilidades y desafíos. Prim...
 
(Have a) rest with Laravel
(Have a) rest with Laravel(Have a) rest with Laravel
(Have a) rest with Laravel
 
Presentation laravel 5 4
Presentation laravel 5 4Presentation laravel 5 4
Presentation laravel 5 4
 
Really Simple Document Management with Alfresco
Really Simple Document Management with AlfrescoReally Simple Document Management with Alfresco
Really Simple Document Management with Alfresco
 
RDA y el proceso de catalogación
RDA y el proceso de catalogaciónRDA y el proceso de catalogación
RDA y el proceso de catalogación
 

Similar to Laravel and SOLR

Meet Solr For The Tirst Again
Meet Solr For The Tirst AgainMeet Solr For The Tirst Again
Meet Solr For The Tirst Again
Varun Thacker
 
Site reliability in the serverless age - Serverless Boston Meetup
Site reliability in the serverless age  - Serverless Boston MeetupSite reliability in the serverless age  - Serverless Boston Meetup
Site reliability in the serverless age - Serverless Boston Meetup
Erik Peterson
 
GraphQL-PHP: Dos and don'ts
GraphQL-PHP: Dos and don'tsGraphQL-PHP: Dos and don'ts
GraphQL-PHP: Dos and don'ts
Václav Šír
 
Ease of use in Apache Solr
Ease of use in Apache SolrEase of use in Apache Solr
Ease of use in Apache Solr
Anshum Gupta
 
Beyond The Rails Way
Beyond The Rails WayBeyond The Rails Way
Beyond The Rails Way
Andrzej Krzywda
 
Solr @ eBay Kleinanzeigen
Solr @ eBay KleinanzeigenSolr @ eBay Kleinanzeigen
Solr @ eBay Kleinanzeigen
Lucidworks (Archived)
 
Best practices for highly available and large scale SolrCloud
Best practices for highly available and large scale SolrCloudBest practices for highly available and large scale SolrCloud
Best practices for highly available and large scale SolrCloud
Anshum Gupta
 
Cvcc performance tuning
Cvcc performance tuningCvcc performance tuning
Cvcc performance tuning
John McCaffrey
 
Which Freaking Database Should I Use?
Which Freaking Database Should I Use?Which Freaking Database Should I Use?
Which Freaking Database Should I Use?
Great Wide Open
 
Scaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million UsersScaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million Users
Amazon Web Services
 
How do Solr and Azure Search compare?
How do Solr and Azure Search compare?How do Solr and Azure Search compare?
How do Solr and Azure Search compare?
SearchStax
 
Scaling Your Applications with Engine Yard Cloud
Scaling Your Applications with Engine Yard CloudScaling Your Applications with Engine Yard Cloud
Scaling Your Applications with Engine Yard Cloud
Engine Yard
 
12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQL12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQL
Konstantin Gredeskoul
 
Rails tools
Rails toolsRails tools
Rails tools
Reuven Lerner
 
Adding GraphQL to your existing architecture
Adding GraphQL to your existing architectureAdding GraphQL to your existing architecture
Adding GraphQL to your existing architecture
Sashko Stubailo
 
Big Data Warehousing Meetup: Developing a super-charged NoSQL data mart using...
Big Data Warehousing Meetup: Developing a super-charged NoSQL data mart using...Big Data Warehousing Meetup: Developing a super-charged NoSQL data mart using...
Big Data Warehousing Meetup: Developing a super-charged NoSQL data mart using...
Caserta
 
How to Build a Big Data Application: Serverless Edition
How to Build a Big Data Application: Serverless EditionHow to Build a Big Data Application: Serverless Edition
How to Build a Big Data Application: Serverless Edition
ecobold
 
Is Serverless The New Swiss Cheese? - AWS Seattle User Group
Is Serverless The New Swiss Cheese? - AWS Seattle User GroupIs Serverless The New Swiss Cheese? - AWS Seattle User Group
Is Serverless The New Swiss Cheese? - AWS Seattle User Group
Chase Douglas
 
SolrCloud-Best Practices for Sitecore. Design, build, and devops considerations
SolrCloud-Best Practices for Sitecore. Design, build, and devops considerationsSolrCloud-Best Practices for Sitecore. Design, build, and devops considerations
SolrCloud-Best Practices for Sitecore. Design, build, and devops considerations
Sameer Maggon
 

Similar to Laravel and SOLR (20)

Meet Solr For The Tirst Again
Meet Solr For The Tirst AgainMeet Solr For The Tirst Again
Meet Solr For The Tirst Again
 
Site reliability in the serverless age - Serverless Boston Meetup
Site reliability in the serverless age  - Serverless Boston MeetupSite reliability in the serverless age  - Serverless Boston Meetup
Site reliability in the serverless age - Serverless Boston Meetup
 
GraphQL-PHP: Dos and don'ts
GraphQL-PHP: Dos and don'tsGraphQL-PHP: Dos and don'ts
GraphQL-PHP: Dos and don'ts
 
Ease of use in Apache Solr
Ease of use in Apache SolrEase of use in Apache Solr
Ease of use in Apache Solr
 
Beyond The Rails Way
Beyond The Rails WayBeyond The Rails Way
Beyond The Rails Way
 
Solr @ eBay Kleinanzeigen
Solr @ eBay KleinanzeigenSolr @ eBay Kleinanzeigen
Solr @ eBay Kleinanzeigen
 
Best practices for highly available and large scale SolrCloud
Best practices for highly available and large scale SolrCloudBest practices for highly available and large scale SolrCloud
Best practices for highly available and large scale SolrCloud
 
EnterpriseSearch
EnterpriseSearchEnterpriseSearch
EnterpriseSearch
 
Cvcc performance tuning
Cvcc performance tuningCvcc performance tuning
Cvcc performance tuning
 
Which Freaking Database Should I Use?
Which Freaking Database Should I Use?Which Freaking Database Should I Use?
Which Freaking Database Should I Use?
 
Scaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million UsersScaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million Users
 
How do Solr and Azure Search compare?
How do Solr and Azure Search compare?How do Solr and Azure Search compare?
How do Solr and Azure Search compare?
 
Scaling Your Applications with Engine Yard Cloud
Scaling Your Applications with Engine Yard CloudScaling Your Applications with Engine Yard Cloud
Scaling Your Applications with Engine Yard Cloud
 
12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQL12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQL
 
Rails tools
Rails toolsRails tools
Rails tools
 
Adding GraphQL to your existing architecture
Adding GraphQL to your existing architectureAdding GraphQL to your existing architecture
Adding GraphQL to your existing architecture
 
Big Data Warehousing Meetup: Developing a super-charged NoSQL data mart using...
Big Data Warehousing Meetup: Developing a super-charged NoSQL data mart using...Big Data Warehousing Meetup: Developing a super-charged NoSQL data mart using...
Big Data Warehousing Meetup: Developing a super-charged NoSQL data mart using...
 
How to Build a Big Data Application: Serverless Edition
How to Build a Big Data Application: Serverless EditionHow to Build a Big Data Application: Serverless Edition
How to Build a Big Data Application: Serverless Edition
 
Is Serverless The New Swiss Cheese? - AWS Seattle User Group
Is Serverless The New Swiss Cheese? - AWS Seattle User GroupIs Serverless The New Swiss Cheese? - AWS Seattle User Group
Is Serverless The New Swiss Cheese? - AWS Seattle User Group
 
SolrCloud-Best Practices for Sitecore. Design, build, and devops considerations
SolrCloud-Best Practices for Sitecore. Design, build, and devops considerationsSolrCloud-Best Practices for Sitecore. Design, build, and devops considerations
SolrCloud-Best Practices for Sitecore. Design, build, and devops considerations
 

Recently uploaded

Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptxText-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
ShamsuddeenMuhammadA
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
Roshan Dwivedi
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
e20449
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 

Recently uploaded (20)

Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptxText-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 

Laravel and SOLR

  • 1. Laravel and SOLR How to build a powerful search combination - Peter Steenbergen
  • 3. What I am about to cover • The meaning of the term powerful • MySQL Drawbacks • Why SOLR • Usage of tools • Setting up / starting with SOLR Server • Starting with SOLR • Integrate SOLR with Laravel • Laravel and SOLR Searching
  • 4. What I do NOT cover • Front-End implementation • No Angular, VueJS or React integration (recommend VueJS though) • Authentication • Internals of SOLR / Elasticsearch • Talk of Elze Kool in the summer https://bitbucket.org/elzekool/talk-solr-elasticsearch-internals/src
  • 5. What do I mean by “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.
  • 6. 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. • 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.
  • 7. Why I started with SOLR • Providers send vehicle updates daily between 06:00 and 22:00 more than 25.000 vehicles are changed throughout the day. • Encountered MySQL limitations • Speed – With JOINS for additional data. • Table LOCK during write actions. • Relevancy was not great. • A temporary solution was creating a flat table, that contains all the data to be shown at the searchoverview pages.
  • 8. Why I started with SOLR
  • 9. Thats why I started with SOLR After changing the search from MySQL to SOLR • Search time decreased from seconds to milliseconds. • Relevancy went up since the search internals work differently. • Costs went down, less resources needed. • Organic traffic went up since the improved loading times. • Visitors viewed more paged since better performance. Statistics: 17.k daily visitors, 160k vehicles, 25k-30k changes
  • 10. Next up: coverage of the following tools • MySQL (for main storage) • SOLR • Docker (Optionaly) • Laravel
  • 11. Let the fun stuff begin!
  • 12. Setting up / Starting MySQL on OSX • Default credentials User: root Password: <empty> Port: 3301
  • 13. Setting up / starting SOLR on OSX https://github.com/petericebear/solr-configsets http://brew.sh
  • 14. Setting up / starting SOLR with docker https://github.com/petericebear/solr-configsets
  • 15. Where to begin with SOLR - schema.xml • Fields 1. Type What kind of field is it? 2. Indexed Do you want to search in it? 3. Stored Return the data in results? 4. Multivalued Can it contain more than 1 value? • Fieldtypes • String • Integer • Float • Boolean • Date • Location (Latitude/Longitude) • ..
  • 16. Where to begin with SOLR - additional Copy contents of a field to another field Add analyzer to a fieldtype – remove stop words “de, het, een, op, in, naar” etc.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21. 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:
  • 22. Communicating with SOLR • https://github.com/solariumphp/solarium • Over 1.2million downloads Run the following in your terminal:
  • 23. Adding a configuration • config/solarium.php
  • 24. Add ServiceProvider When the application needs the SolariumClient class, it will inject the created configuration to its Client. This way you will never have to touch the code when something changes to the server or core setting. Notice the $defer setting. When true this ServiceProvider only will autoload when the Client is needed and NOT with evry request.
  • 25. Activate ServiceProvider To make use of the new ServiceProvider in your application you must add it in config/app.php and add it to the list of providers.
  • 27.
  • 28. Adding contents to SOLR Can contain single or multiple documents. Basic object for setting the data.
  • 29. Removing a document from SOLR
  • 31. Facets query inStock possible values True [200] False [100]
  • 32. Combine for API endpoint
  • 33. More examples • https://github.com/solariumphp/solarium/tree/master/examples • Well documented examples • http://petericebear.github.io/ • Personal blog with more SOLR integrations
  • 34. Questions? Twitter / Github: @petericebear Email: psteenbergen@gmail.com COUPONCODE: SOLRMEETING 50% OFF - FIRST MONTH info@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. Dit zorgde voor een grote wachtrij – net als bij BlackFriday voor de winkels probeerden vele bezoekers op piek momenten door 1 deur te gaan. En dan krijg je het volgende effect.
  4. Build a docker instance with additional config sets. PR’s welcome docker-machine start eval $(docker-machine env)
  5. Verschil uitleggen bij HourGroup en HourText
  6. Next slide is about