SlideShare a Scribd company logo
Apache Solr
Introduction & Demo
• What is Apache Solr?
• Start/stop Solr
• Indexing data to Solr
• Searching data
• Running a SolrCloud cluster
• Hacking Solr
Agenda
• Lucene based search server + other features
• Access Lucene over HTTP:
• Java, Python, Ruby, .NET, PHP over XML/JSON and
other formats
• Faceting (guided navigation), suggestions,
highlighting etc.
• Replication and distributed search
• Lucene best practices
What is Apache Solr?
• Extract:
• tar xvf solr-5.1.0.tgz (linux/mac)
• unzip solr-5.1.0.zip or click+extract (windows)
• Run:
• ./bin/solr start -e schemaless
• ./bin/solr start -e schemaless -p 8983
• ./bin/solr -help
• ./bin/solr start -help
• Stop:
• ./bin/solr stop
Running Solr
• ./bin/post script
• Using curl directly
• Using the Admin UI
• SolrJ and other indexing clients
Indexing data
Demo time
Inverted index
• +red +shoes = red AND shoes
• +shoes -red = shoes NOT red
• “android phone”
• “android phone” -samsung = “android phone” NOT samsung “android
samsung”~4
• merced*
• createDate:[201301 TO 201401]
• author:shalin
• author:”shalin mangar”
• author:”shalin mangar” AND project:(lucene OR solr) title:samsung^5
category:phone
Lucene/Solr query syntax
• DataImportHandler: Index databases, Email, RSS, XMLs etc.
• Rich document support: PDF, MS Office, Images etc.
• Faceting, stats, analytics
• Replication for high query volume
• Production systems with billions of documents
• Very extensible and customizable
• Embedded in commercial search products from Lucidworks,
DataStax, Cloudera, Hortonworks, Pivotal, Amazon
Cloudsearch, Riak etc.
Other features of Solr
• Subset of optional features in Solr to enable and
simplify horizontal scaling a search index using
sharding and replication
• Goals: scalability, performance, high-availability,
simplicity, and elasticity
What is SolrCloud?
• ./bin/solr -e cloud
• Yeah, it’s that simple!
Running SolrCloud
SolrCloud demo
• http://wiki.apache.org/solr/HowToContribute
• Pre-requisites:
• git: git clone http://git-wip-us.apache.org/repos/asf/
lucene-solr.git
• github: fork and clone apache/lucene-solr
• ant 1.8.x or above
• Eclipse or Intellij Idea (I recommend Idea)
• Put svn/git and ant in your $PATH or %PATH%
Hacking Solr
• ant ivy-bootstrap (required only once)
• ant idea or ant eclipse (generated a complete project for you which
you can open in your favourite IDE)
• Find an existing Jira issue or open a new one at http://
issues.apache.org/jira/browse/SOLR
• Make changes, write tests, once finished:
• run ‘cd solr; ant server’ to build Solr and start via bin/solr scripts
• run ‘ant test’ (it can take a while), ensure all tests pass
• run ‘ant precommit’, (run from the checkout root) ensure it passes
• Generate a patch with ‘svn diff’ or ‘git diff’ and attach to Jira
Hacking Solr
• http://lucene.apache.org/solr
• https://cwiki.apache.org/confluence/display/solr/
Apache+Solr+Reference+Guide
• https://issues.apache.org/jira/browse/SOLR
• Ask me: solr-help.slack.com
• Ask other users: solr-user@lucene.apache.org
• Ask developers: dev@lucene.apache.org (use
sparingly)
Resources
Thank you
Shalin Shekhar Mangar, shalin@apache.org

More Related Content

PDF
Best practices for highly available and large scale SolrCloud
PDF
Apache Solr 5.0 and beyond
PDF
What's New in Apache Solr 4.10
PDF
Solr Recipes
PPTX
Scaling SolrCloud to a large number of Collections
PDF
Scaling SolrCloud to a Large Number of Collections - Fifth Elephant 2014
PDF
Ease of use in Apache Solr
PDF
Inside Solr 5 - Bangalore Solr/Lucene Meetup
Best practices for highly available and large scale SolrCloud
Apache Solr 5.0 and beyond
What's New in Apache Solr 4.10
Solr Recipes
Scaling SolrCloud to a large number of Collections
Scaling SolrCloud to a Large Number of Collections - Fifth Elephant 2014
Ease of use in Apache Solr
Inside Solr 5 - Bangalore Solr/Lucene Meetup

What's hot (20)

PDF
Deploying and managing Solr at scale
PDF
What's new in Solr 5.0
PDF
Solr security frameworks
ODP
Introduction to Apache Solr
PDF
Understanding the Solr security framework - Lucene Solr Revolution 2015
PPTX
Enterprise Search Using Apache Solr
PDF
SolrCloud Cluster management via APIs
PDF
Apache Solr! Enterprise Search Solutions at your Fingertips!
KEY
Apache Solr - Enterprise search platform
PPTX
Solrcloud Leader Election
PDF
First oslo solr community meetup lightning talk janhoy
PDF
SearchHub - How to Spend Your Summer Keeping it Real: Presented by Grant Inge...
PPTX
Managing a SolrCloud cluster using APIs
PPTX
Apache Solr-Webinar
PDF
H-Hypermap - Heatmap Analytics at Scale: Presented by David Smiley, D W Smile...
PPT
Solr vs ElasticSearch
PDF
Flexible search in Apache Jackrabbit Oak
PPTX
Drupal7 and Apache Solr
PPTX
Battle of the giants: Apache Solr vs ElasticSearch
PPTX
Solr Exchange: Introduction to SolrCloud
Deploying and managing Solr at scale
What's new in Solr 5.0
Solr security frameworks
Introduction to Apache Solr
Understanding the Solr security framework - Lucene Solr Revolution 2015
Enterprise Search Using Apache Solr
SolrCloud Cluster management via APIs
Apache Solr! Enterprise Search Solutions at your Fingertips!
Apache Solr - Enterprise search platform
Solrcloud Leader Election
First oslo solr community meetup lightning talk janhoy
SearchHub - How to Spend Your Summer Keeping it Real: Presented by Grant Inge...
Managing a SolrCloud cluster using APIs
Apache Solr-Webinar
H-Hypermap - Heatmap Analytics at Scale: Presented by David Smiley, D W Smile...
Solr vs ElasticSearch
Flexible search in Apache Jackrabbit Oak
Drupal7 and Apache Solr
Battle of the giants: Apache Solr vs ElasticSearch
Solr Exchange: Introduction to SolrCloud
Ad

Viewers also liked (20)

PPT
Introduction to Apache Solr.
PDF
Cross Datacenter Replication in Apache Solr 6
PDF
Apache Solr crash course
ODP
GIDS2014: SolrCloud: Searching Big Data
PDF
Introduction to Apache Solr
PDF
SolrCloud and Shard Splitting
PDF
Parallel SQL and Streaming Expressions in Apache Solr 6
PDF
High Performance Solr
PDF
Scaling search with SolrCloud
PDF
Call me maybe: Jepsen and flaky networks
PPTX
20130310 solr tuorial
PPTX
SharePoint Search for Dummies
PDF
Concepts de Recherche dans un environnement WSS et MOSS
PDF
Introduction to Solr
PDF
Solr Compute Cloud – An Elastic Solr Infrastructure: Presented by Nitin Sharm...
PPTX
Integrate ManifoldCF with Solr
PPTX
Security and Governance on Hadoop with Apache Atlas and Apache Ranger by Srik...
PDF
Manage tracability with Apache Atlas, a flexible metadata repository
PPT
Solr Presentation
PDF
SolrCloud - High Availability and Fault Tolerance: Presented by Mark Miller, ...
Introduction to Apache Solr.
Cross Datacenter Replication in Apache Solr 6
Apache Solr crash course
GIDS2014: SolrCloud: Searching Big Data
Introduction to Apache Solr
SolrCloud and Shard Splitting
Parallel SQL and Streaming Expressions in Apache Solr 6
High Performance Solr
Scaling search with SolrCloud
Call me maybe: Jepsen and flaky networks
20130310 solr tuorial
SharePoint Search for Dummies
Concepts de Recherche dans un environnement WSS et MOSS
Introduction to Solr
Solr Compute Cloud – An Elastic Solr Infrastructure: Presented by Nitin Sharm...
Integrate ManifoldCF with Solr
Security and Governance on Hadoop with Apache Atlas and Apache Ranger by Srik...
Manage tracability with Apache Atlas, a flexible metadata repository
Solr Presentation
SolrCloud - High Availability and Fault Tolerance: Presented by Mark Miller, ...
Ad

Similar to Intro to Apache Solr (20)

PDF
Solr search engine with multiple table relation
PDF
Solr Flair
KEY
Intro to Apache Solr for Drupal
PPT
Enterprise search in_drupal_pub
PDF
Meet Solr For The Tirst Again
PDF
Solr Powered Lucene
PDF
The First Class Integration of Solr with Hadoop
PDF
How do Solr and Azure Search compare?
PPTX
Spider进化论
PDF
Rapid prototyping with solr - By Erik Hatcher
PDF
Rapid Prototyping with Solr
PDF
SolrCloud on Hadoop
PPT
Building Intelligent Search Applications with Apache Solr and PHP5
KEY
Enterprise search in Plone using Solr
PDF
Introduction to Solr
KEY
Big Search with Big Data Principles
PDF
Suche mit Apache Lucene & Co.
PPTX
Laravel introduction
Solr search engine with multiple table relation
Solr Flair
Intro to Apache Solr for Drupal
Enterprise search in_drupal_pub
Meet Solr For The Tirst Again
Solr Powered Lucene
The First Class Integration of Solr with Hadoop
How do Solr and Azure Search compare?
Spider进化论
Rapid prototyping with solr - By Erik Hatcher
Rapid Prototyping with Solr
SolrCloud on Hadoop
Building Intelligent Search Applications with Apache Solr and PHP5
Enterprise search in Plone using Solr
Introduction to Solr
Big Search with Big Data Principles
Suche mit Apache Lucene & Co.
Laravel introduction

Recently uploaded (20)

PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPTX
history of c programming in notes for students .pptx
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
Essential Infomation Tech presentation.pptx
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Digital Strategies for Manufacturing Companies
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Softaken Excel to vCard Converter Software.pdf
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PTS Company Brochure 2025 (1).pdf.......
Wondershare Filmora 15 Crack With Activation Key [2025
history of c programming in notes for students .pptx
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
2025 Textile ERP Trends: SAP, Odoo & Oracle
Upgrade and Innovation Strategies for SAP ERP Customers
Navsoft: AI-Powered Business Solutions & Custom Software Development
Essential Infomation Tech presentation.pptx
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
CHAPTER 2 - PM Management and IT Context
How Creative Agencies Leverage Project Management Software.pdf
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Digital Strategies for Manufacturing Companies
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Softaken Excel to vCard Converter Software.pdf
Reimagine Home Health with the Power of Agentic AI​
wealthsignaloriginal-com-DS-text-... (1).pdf
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool

Intro to Apache Solr

  • 2. • What is Apache Solr? • Start/stop Solr • Indexing data to Solr • Searching data • Running a SolrCloud cluster • Hacking Solr Agenda
  • 3. • Lucene based search server + other features • Access Lucene over HTTP: • Java, Python, Ruby, .NET, PHP over XML/JSON and other formats • Faceting (guided navigation), suggestions, highlighting etc. • Replication and distributed search • Lucene best practices What is Apache Solr?
  • 4. • Extract: • tar xvf solr-5.1.0.tgz (linux/mac) • unzip solr-5.1.0.zip or click+extract (windows) • Run: • ./bin/solr start -e schemaless • ./bin/solr start -e schemaless -p 8983 • ./bin/solr -help • ./bin/solr start -help • Stop: • ./bin/solr stop Running Solr
  • 5. • ./bin/post script • Using curl directly • Using the Admin UI • SolrJ and other indexing clients Indexing data
  • 8. • +red +shoes = red AND shoes • +shoes -red = shoes NOT red • “android phone” • “android phone” -samsung = “android phone” NOT samsung “android samsung”~4 • merced* • createDate:[201301 TO 201401] • author:shalin • author:”shalin mangar” • author:”shalin mangar” AND project:(lucene OR solr) title:samsung^5 category:phone Lucene/Solr query syntax
  • 9. • DataImportHandler: Index databases, Email, RSS, XMLs etc. • Rich document support: PDF, MS Office, Images etc. • Faceting, stats, analytics • Replication for high query volume • Production systems with billions of documents • Very extensible and customizable • Embedded in commercial search products from Lucidworks, DataStax, Cloudera, Hortonworks, Pivotal, Amazon Cloudsearch, Riak etc. Other features of Solr
  • 10. • Subset of optional features in Solr to enable and simplify horizontal scaling a search index using sharding and replication • Goals: scalability, performance, high-availability, simplicity, and elasticity What is SolrCloud?
  • 11. • ./bin/solr -e cloud • Yeah, it’s that simple! Running SolrCloud
  • 13. • http://wiki.apache.org/solr/HowToContribute • Pre-requisites: • git: git clone http://git-wip-us.apache.org/repos/asf/ lucene-solr.git • github: fork and clone apache/lucene-solr • ant 1.8.x or above • Eclipse or Intellij Idea (I recommend Idea) • Put svn/git and ant in your $PATH or %PATH% Hacking Solr
  • 14. • ant ivy-bootstrap (required only once) • ant idea or ant eclipse (generated a complete project for you which you can open in your favourite IDE) • Find an existing Jira issue or open a new one at http:// issues.apache.org/jira/browse/SOLR • Make changes, write tests, once finished: • run ‘cd solr; ant server’ to build Solr and start via bin/solr scripts • run ‘ant test’ (it can take a while), ensure all tests pass • run ‘ant precommit’, (run from the checkout root) ensure it passes • Generate a patch with ‘svn diff’ or ‘git diff’ and attach to Jira Hacking Solr
  • 15. • http://lucene.apache.org/solr • https://cwiki.apache.org/confluence/display/solr/ Apache+Solr+Reference+Guide • https://issues.apache.org/jira/browse/SOLR • Ask me: solr-help.slack.com • Ask other users: [email protected] • Ask developers: [email protected] (use sparingly) Resources