SlideShare ist ein Scribd-Unternehmen logo
1 von 53
Downloaden Sie, um offline zu lesen
Apache-Solr!
Enterprise Search Solutions
at your Fingertips!

  Murshed Ahmmad Khan
@usamurai, murshed2k@gmail.com
Presented at phpXperts
seminar 2011…
Enterprise Search Server


    The criteria…
Fast
Flexible
Powerful
Scalable
Relevant Results
Production ready &
 Easy deployment
What’s in your
mind, the name…

      ??
Apache Solr!



Fits all the above mentioned criteria…
Solr, What is it…?
q O pen Source, Java application

q R uns as a standalone full-text
  search server within any servlet
  container

q U ses Lucene Java search library
  as its core
SOLR WORK FLOW…
Solr History…
q D eveloped at CNET Networks
  by Yonik Seeley


q D onated to ASF (Apache
  Software Foundation) in early
  2006
Solr History…(2)
q I ncubation period ended in
  january 2007 (v-1.2 released)


q S olr is now maintained as a
  subproject of Lucene
Solr - Features…
Powerful Full-Text search…
Hit Highlighting…
Faceted Search…
Tag Clouds…
Geo-spatial search…
Solr – Features (cont..)
q  Database integration

q  Rich document (Word, PDF)
  handling

q  REST-like HTTP/XML, JSON APIs
  (so, you can code virtually in
  any language)
CLIENT API SUPPORT…
q  Java (SolrJ),
q  .NET (solrnet, SolrSharp),
q  PHP (SolPHP),
q  Python (SolPython),
q  Ruby(on Rails) (rsolr, acts-as-solr,
    sunspot),
q  C++,
q  XML/HTTP,
q  JSON/HTTP (AJAX Solr) ++
q  PERL(SolPerl)
Solr - Features… (cont…)
q  Flexible configuration

q  Extensive Plugin architecture
  for advanced customization

q  Scalable distributed search,
  dynamic clustering, index
  replication
Alternatives to Solr
q Use Google (GSA – has
   integration problems).

q  FAST (Stopped supporting
  linux)

q  Use Lucene (write code on
  top of that)
Alternatives to Solr…(2)
q  Use your Database (has
    performance issues)

q  Sphinx (written in C++)

q  Commercial Libraries (e.g.
  lucidimagination.com)

q  Write your own
Who Use
Solr/Lucene?
Who use Solr/Lucene…




More names: http://wiki.apache.org/
solr/PublicServers
OPERATING SYSTEM SUPPORT
q All with a Java VM, including:

q Linux (all versions)

q Windows (all versions)

q MacOS (all versions)

q Unix variants
APP SERVER SUPPORT
q Apache Tomcat,
q Jetty,
q Resin,
q WebLogicTM,
q WebSphereTM,
q GlassFish,
q dmServerTM,
q JBossTM and many more
q Java JDK 1.5 or later [requirement]
INSTALLATION

1.  Download the latest version of:
    apache-solr & tomcat



2. Extract it:
$tar -xzvf ./apache-solr-1.4.1.tgz
$tar -xzvf ./apache-tomcat-6.0.35.tar.gz
INSTALLATION
3. copy the solr.war file in the tomcat
webapps folder:
$ cp apache-solr-1.4.1/dist/apache-
solr-1.4.1.war  apache-tomcat-6.0.35/
webapps/solr.war


4. copy the example/solr directory into the
tomcat home directory
$ cp -r apache-solr-1.4.1/example/solr .
INSTALLATION
5. start the tomcat server
$ ./bin/startup.sh



6. Visit http://localhost:8080/
solr/admin/
YOU ARE DONE…
CREATE SCHEMA.XML
<field name="id" type="string" indexed="true"
stored="true" required="true" />
<field name="service" type="string" indexed="true"
stored="true" required="true" />
<field name="contentType" type="string" indexed="true"
stored="true" required="true" />
<field name="dbId" type="long" indexed="true"
stored="true" />
<field name="content" type="text" indexed="true"
stored="true" />
<copyField source="*" dest=”all” />
INDEX DOCUMENTS (INDEXER)


The Common Loop
INDEX DOCUMENTS
1.  </add>
Add single/multiple documents
$doc = new SolrSimpleDocument( array(
            new SolrSimpleField('id', ’aawaj-profile-' . $user->id),
            new SolrSimpleField('service', 'aawaj'),
            new SolrSimpleField('contentType', 'profile'),
            new SolrSimpleField('dbId', (string)$user->id)
        ));
  $this->solr->add($doc);
INDEX DOCUMENTS
2. </commit>
Commit multiple documents at
once.

$this->solr->commit();
INDEX DOCUMENTS
3. </optimize>
Optimize, for performance
improvement



$this->solr->optimize();
SOLR QUERY SYNTAXES
QUERY SYNTAXES (RDMS)
SELECT * FROM post WHERE
(topic LIKE ‘%apache%’ OR
author LIKE ‘%kabir%’)


OR (topic LIKE ‘%solr%’ OR
author LIKE ‘%frank%’) ORDER
BY id DESC
QUERY SYNTAXES (SOLR)




Topic:"The Right Way" AND
author:WrongGuy
BOOSTING TERMS()


topic: "jakarta
apache"^4 "Apache
Lucene"
FUZZY SEARCH (SOLR)


topic:roam~ (similar in
spelling roam)

matches foam roams, based on
the Levenshtein Distance, or Edit
Distance algorithm
PROXIMITY SEARCH (SOLR)

“jakarta apache”~10


search for a "apache" and
"jakarta" within 10 words of
each other in a document
SO, NOW,
CAN I MAKE A MINI
     GOOGLE?
YES, YOU CAN!

q Apache NUTCH, already there

q Open source, Web-search
   software project.

q Based on Solr...
INTERESTED? READ MORE…
Ø  http://lucene.apache.org/solr/
Ø  http://wiki.apache.org/solr
Ø  http://lucene.apache.org/java/docs/
    scoring.html
Ø  http://lucene.apache.org/java/3_5_0/
    queryparsersyntax.html
Ø  http://www.slideshare.net/erikhatcher/solr-
    search-at-the-speed-of-light
    http://www.slideshare.net/pittaya/using-
    apache-solr
WHO AM I…
  murshed ahmmad Khan
head of development,




  http://www.usamurai.com
@usamurai
email: murshed2k@gmail.com
THANKS…



Questions?

Weitere ähnliche Inhalte

Was ist angesagt?

Solr Black Belt Pre-conference
Solr Black Belt Pre-conferenceSolr Black Belt Pre-conference
Solr Black Belt Pre-conference
Erik Hatcher
 
20130310 solr tuorial
20130310 solr tuorial20130310 solr tuorial
20130310 solr tuorial
Chris Huang
 

Was ist angesagt? (20)

Solr Black Belt Pre-conference
Solr Black Belt Pre-conferenceSolr Black Belt Pre-conference
Solr Black Belt Pre-conference
 
Apache Solr
Apache SolrApache Solr
Apache Solr
 
New-Age Search through Apache Solr
New-Age Search through Apache SolrNew-Age Search through Apache Solr
New-Age Search through Apache Solr
 
Introduction to Apache Solr
Introduction to Apache SolrIntroduction to Apache Solr
Introduction to Apache Solr
 
20130310 solr tuorial
20130310 solr tuorial20130310 solr tuorial
20130310 solr tuorial
 
Introduction to Solr
Introduction to SolrIntroduction to Solr
Introduction to Solr
 
Apache Solr Workshop
Apache Solr WorkshopApache Solr Workshop
Apache Solr Workshop
 
Apache Solr
Apache SolrApache Solr
Apache Solr
 
Solr Powered Lucene
Solr Powered LuceneSolr Powered Lucene
Solr Powered Lucene
 
Introduction to Apache solr
Introduction to Apache solrIntroduction to Apache solr
Introduction to Apache solr
 
Integrating the Solr search engine
Integrating the Solr search engineIntegrating the Solr search engine
Integrating the Solr search engine
 
Rapid Prototyping with Solr
Rapid Prototyping with SolrRapid Prototyping with Solr
Rapid Prototyping with Solr
 
Lucene's Latest (for Libraries)
Lucene's Latest (for Libraries)Lucene's Latest (for Libraries)
Lucene's Latest (for Libraries)
 
Rebuilding Solr 6 examples - layer by layer (LuceneSolrRevolution 2016)
Rebuilding Solr 6 examples - layer by layer (LuceneSolrRevolution 2016)Rebuilding Solr 6 examples - layer by layer (LuceneSolrRevolution 2016)
Rebuilding Solr 6 examples - layer by layer (LuceneSolrRevolution 2016)
 
Solr Recipes
Solr RecipesSolr Recipes
Solr Recipes
 
Building your own search engine with Apache Solr
Building your own search engine with Apache SolrBuilding your own search engine with Apache Solr
Building your own search engine with Apache Solr
 
Solr Indexing and Analysis Tricks
Solr Indexing and Analysis TricksSolr Indexing and Analysis Tricks
Solr Indexing and Analysis Tricks
 
Webinar: What's New in Solr 7
Webinar: What's New in Solr 7 Webinar: What's New in Solr 7
Webinar: What's New in Solr 7
 
Solr Troubleshooting - TreeMap approach
Solr Troubleshooting - TreeMap approachSolr Troubleshooting - TreeMap approach
Solr Troubleshooting - TreeMap approach
 
Introduction to Solr
Introduction to SolrIntroduction to Solr
Introduction to Solr
 

Andere mochten auch

Presentation11
Presentation11Presentation11
Presentation11
sumberlor
 
Search Engine Capabilities - Apache Solr(Lucene)
Search Engine Capabilities - Apache Solr(Lucene)Search Engine Capabilities - Apache Solr(Lucene)
Search Engine Capabilities - Apache Solr(Lucene)
Manish kumar
 

Andere mochten auch (8)

Presentation11
Presentation11Presentation11
Presentation11
 
Introduction to search engine-building with Lucene
Introduction to search engine-building with LuceneIntroduction to search engine-building with Lucene
Introduction to search engine-building with Lucene
 
Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine Learning
 
Search Engine Capabilities - Apache Solr(Lucene)
Search Engine Capabilities - Apache Solr(Lucene)Search Engine Capabilities - Apache Solr(Lucene)
Search Engine Capabilities - Apache Solr(Lucene)
 
Cms integration of apache solr how we did it.
Cms integration of apache solr   how we did it.Cms integration of apache solr   how we did it.
Cms integration of apache solr how we did it.
 
Building Intelligent Search Applications with Apache Solr and PHP5
Building Intelligent Search Applications with Apache Solr and PHP5Building Intelligent Search Applications with Apache Solr and PHP5
Building Intelligent Search Applications with Apache Solr and PHP5
 
Solr vs. Elasticsearch - Case by Case
Solr vs. Elasticsearch - Case by CaseSolr vs. Elasticsearch - Case by Case
Solr vs. Elasticsearch - Case by Case
 
Building a real time, solr-powered recommendation engine
Building a real time, solr-powered recommendation engineBuilding a real time, solr-powered recommendation engine
Building a real time, solr-powered recommendation engine
 

Ähnlich wie Apache Solr! Enterprise Search Solutions at your Fingertips!

Dev8d Apache Solr Tutorial
Dev8d Apache Solr TutorialDev8d Apache Solr Tutorial
Dev8d Apache Solr Tutorial
Sourcesense
 
Enterprise search in_drupal_pub
Enterprise search in_drupal_pubEnterprise search in_drupal_pub
Enterprise search in_drupal_pub
dstuartnz
 
Rapid Prototyping with Solr
Rapid Prototyping with SolrRapid Prototyping with Solr
Rapid Prototyping with Solr
Erik Hatcher
 
NYC Lucene/Solr Meetup: Spark / Solr
NYC Lucene/Solr Meetup: Spark / SolrNYC Lucene/Solr Meetup: Spark / Solr
NYC Lucene/Solr Meetup: Spark / Solr
thelabdude
 

Ähnlich wie Apache Solr! Enterprise Search Solutions at your Fingertips! (20)

Rails and the Apache SOLR Search Engine
Rails and the Apache SOLR Search EngineRails and the Apache SOLR Search Engine
Rails and the Apache SOLR Search Engine
 
Small wins in a small time with Apache Solr
Small wins in a small time with Apache SolrSmall wins in a small time with Apache Solr
Small wins in a small time with Apache Solr
 
Dev8d Apache Solr Tutorial
Dev8d Apache Solr TutorialDev8d Apache Solr Tutorial
Dev8d Apache Solr Tutorial
 
Ruby on Rails All Hands Meeting
Ruby on Rails All Hands MeetingRuby on Rails All Hands Meeting
Ruby on Rails All Hands Meeting
 
Apache Solr + ajax solr
Apache Solr + ajax solrApache Solr + ajax solr
Apache Solr + ajax solr
 
Building Enterprise Search Engines using Open Source Technologies
Building Enterprise Search Engines using Open Source TechnologiesBuilding Enterprise Search Engines using Open Source Technologies
Building Enterprise Search Engines using Open Source Technologies
 
Building Enterprise Search Engines using Open Source Technologies
Building Enterprise Search Engines using Open Source TechnologiesBuilding Enterprise Search Engines using Open Source Technologies
Building Enterprise Search Engines using Open Source Technologies
 
Real time Analytics with Apache Kafka and Apache Spark
Real time Analytics with Apache Kafka and Apache SparkReal time Analytics with Apache Kafka and Apache Spark
Real time Analytics with Apache Kafka and Apache Spark
 
Enterprise search in_drupal_pub
Enterprise search in_drupal_pubEnterprise search in_drupal_pub
Enterprise search in_drupal_pub
 
New-Age Search through Apache Solr
New-Age Search through Apache SolrNew-Age Search through Apache Solr
New-Age Search through Apache Solr
 
Getting started faster with LucidWorks for Solr
Getting started faster with LucidWorks for SolrGetting started faster with LucidWorks for Solr
Getting started faster with LucidWorks for Solr
 
Getting to know Laravel 5
Getting to know Laravel 5Getting to know Laravel 5
Getting to know Laravel 5
 
Apache Lucene Searching The Web
Apache Lucene Searching The WebApache Lucene Searching The Web
Apache Lucene Searching The Web
 
Apache Lucene: Searching the Web and Everything Else (Jazoon07)
Apache Lucene: Searching the Web and Everything Else (Jazoon07)Apache Lucene: Searching the Web and Everything Else (Jazoon07)
Apache Lucene: Searching the Web and Everything Else (Jazoon07)
 
Rapid Prototyping with Solr
Rapid Prototyping with SolrRapid Prototyping with Solr
Rapid Prototyping with Solr
 
NYC Lucene/Solr Meetup: Spark / Solr
NYC Lucene/Solr Meetup: Spark / SolrNYC Lucene/Solr Meetup: Spark / Solr
NYC Lucene/Solr Meetup: Spark / Solr
 
Oslo Solr MeetUp March 2012 - Solr4 alpha
Oslo Solr MeetUp March 2012 - Solr4 alphaOslo Solr MeetUp March 2012 - Solr4 alpha
Oslo Solr MeetUp March 2012 - Solr4 alpha
 
From content to search: speed-dating Apache Solr (ApacheCON 2018)
From content to search: speed-dating Apache Solr (ApacheCON 2018)From content to search: speed-dating Apache Solr (ApacheCON 2018)
From content to search: speed-dating Apache Solr (ApacheCON 2018)
 
Solr search engine with multiple table relation
Solr search engine with multiple table relationSolr search engine with multiple table relation
Solr search engine with multiple table relation
 
Solr as a Spark SQL Datasource
Solr as a Spark SQL DatasourceSolr as a Spark SQL Datasource
Solr as a Spark SQL Datasource
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 

Apache Solr! Enterprise Search Solutions at your Fingertips!