SlideShare uma empresa Scribd logo
1 de 40
Introduction à Solr Saïd Radhouani Juin 2010
Recherche d’Information - Rappel Saïd Radhouani © 2010 Documents Requête Correspondance ? Interrogation ? ? Indexation ? Index ?
Solr : Introduction ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Saïd Radhouani © 2010
Solr - Pour commencer ,[object Object],[object Object],Saïd Radhouani © 2010
Solr - Principe  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Saïd Radhouani © 2010
Principe de Solr Saïd Radhouani © 2010 document requête document document document Lucene Solr http://… http://… … .xml … .txt … http://…
Solr - Indexation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Saïd Radhouani © 2010
Configuration – Schéma d’indexation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Saïd Radhouani © 2010 <schema name=&quot;example&quot; version=&quot;1.2”> <types> … </types> <fields> … </fields> <uniqueKey>…</uniqueKey> <defaultSearchField>…</defaultSearchField> <solrQueryParser defaultOperator=&quot;OR&quot;/> </schema> schema.xml
Configuration –  Types des champs (field types) Saïd Radhouani © 2010 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Configuration –  Types des champs (field types) ,[object Object],Saïd Radhouani © 2010 < fieldType  name=&quot; text &quot; class=&quot;solr.TextField&quot; positionIncrementGap=&quot;100&quot;>  <analyzer type=&quot; index &quot;>  < tokenizer  class=&quot;solr.WhitespaceTokenizerFactory&quot;/>  < filter  class=&quot;solr.StopFilterFactory&quot; ignoreCase=&quot;true” words=&quot; stopwords.txt &quot;/> </analyzer> <analyzer type=&quot; query &quot;> <tokenizer class=&quot;solr.WhitespaceTokenizerFactory&quot;/> <filter class=&quot;solr.SynonymFilterFactory&quot; synonyms=&quot; synonyms.txt ”  ignoreCase=&quot;true&quot; expand=&quot;true&quot;/> <filter class=&quot;solr.StopFilterFactory&quot; ignoreCase=&quot;true” words=&quot; stopwords.txt &quot;/> </analyzer> </fieldType> schema.xml
Configuration – fichiers des filtres ,[object Object],Saïd Radhouani © 2010 a à et un une de des le La les … voiture,automobile,véhicule VW, Volkswagen … synonyms.txt stopwords.txt
Configuration –  Champs  (fields) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Saïd Radhouani © 2010
Configuration  -  Champs  (fields) – Exemple ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Saïd Radhouani © 2010
Configuration  -  Champs  (fields) - Exemple ,[object Object],Saïd Radhouani © 2010 <field> <field name=&quot;id&quot;  type=&quot;string&quot;  indexed=&quot;true&quot;  stored=&quot;true&quot; required=&quot;true&quot; /> <field name=&quot;marque&quot;  type=&quot;string&quot;  indexed=&quot;true&quot;  stored=&quot;true&quot; required=&quot;true&quot; /> <field name=&quot;modele&quot;  type=&quot;string&quot;  indexed=&quot;true&quot;  stored=&quot;true&quot;/> <field name=&quot;description&quot;  type=&quot;text&quot; indexed=&quot;true&quot;  stored=&quot;true&quot; /> <field name=&quot;couleur&quot;  type=&quot;string&quot;  indexed=&quot;true&quot;  stored=&quot;true&quot;/> <field name=&quot;prix&quot;  type=&quot;tint&quot;  indexed=&quot;true&quot;  stored=&quot;true&quot;/> </field> <uniqueKey>id</uniqueKey> <defaultSearchField>description</defaultSearchField> <solrQueryParser defaultOperator=&quot;OR&quot;/> schema.xml
Préparation des documents ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Saïd Radhouani © 2010 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],documents.xml
Préparation des documents - exemple ,[object Object],Saïd Radhouani © 2010 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],voitures.xml
Indexation des documents  Saïd Radhouani © 2010 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Indexation – suppression de documents Saïd Radhouani © 2010 ,[object Object],<delete><id>1</id></delete> ,[object Object],<delete> <query>marque:Peugeot</query> </delete> Supprimer-par-id.xml Supprimer-par-requete.xml
Mise à jour de l’index – commit/optimize Saïd Radhouani © 2010 ,[object Object],[object Object],[object Object],curl $URL --data-binary '<commit/>' -H 'Content-type:text/xml; charset=utf-8’ ,[object Object],[object Object],[object Object],[object Object],curl $URL --data-binary '<optimize/>' -H 'Content-type:text/xml; charset=utf-8’
Interrogation : Correspondance document-requête (Matching) Saïd Radhouani © 2010 une voiture une voiture WhitespaceTokenizer StopFilter  ignoreCase=true  un automobile pas cher  WhitespaceTokenizer SynonymFilter ignoreCase=true expand=true StopFilter  ignoreCase=true Requête Correspondance Document un automobile  pas ,[object Object],cher un automobile  pas cher voiture automobile  cher voiture voiture
Interrogation – Syntaxe de la requête ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Saïd Radhouani © 2010
Interrogation – Paramètres ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Saïd Radhouani © 2010
Interrogation – Paramètres  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Saïd Radhouani © 2010
Interrogation – Requête/Réponse Saïd Radhouani © 2010 ,[object Object],<response> <lst name=&quot;responseHeader&quot;> <int name=&quot;status&quot;>0</int> <int name=&quot;QTime&quot;>0</int> <str name=&quot;q&quot;> marque:BMW </str> <str name=“fl&quot;> marque,modele,prix </str> </lst> <result name=&quot;response&quot; numFound=&quot;1&quot; start=&quot;0&quot;> <doc>  <str name=” marque &quot;>BMW</str> <str name=” modele &quot;>X5</str> <str name=” prix &quot;>46000</str> </doc>  </result> </response>
Démo – Contenu du répertoire de solr Saïd Radhouani © 2010 Programme pour démarrer Solr Répertoire contenant les fichiers de configuration ,[object Object],[object Object]
Démo – Contenu du répertoire de solr Saïd Radhouani © 2010 Répertoire contenant les documents à indexer Programmes pour insérer les documents dans l’index
Démo - Démarrage / Arrêt de Solr ,[object Object],[object Object],[object Object],[object Object],[object Object],Saïd Radhouani © 2010
Démo – Solr démarré Saïd Radhouani © 2010
Saïd Radhouani © 2010 Démo – Page d’administration de Solr
Saïd Radhouani © 2010 Démo – Page d’administration de Solr
Démo – Ma première requête Saïd Radhouani © 2010
Saïd Radhouani © 2010 Démo – Ma première réponse
Démo – Préparation de schema.xml ,[object Object],[object Object],[object Object],[object Object],[object Object],Saïd Radhouani © 2010
Démo – Préparation des documents ,[object Object],Saïd Radhouani © 2010 …
Démo - Indexation des documents ,[object Object],[object Object],[object Object],Saïd Radhouani © 2010
Démo – Interrogation Saïd Radhouani © 2010
Démo – Contenu de mon index Saïd Radhouani © 2010
Démo – Contenu de mon index Saïd Radhouani © 2010
Démo – Analyse des types définis Saïd Radhouani © 2010 Schema.xml Tokenizer Stemmer Stop words Synonyms Protected words
Liens ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Saïd Radhouani © 2010

Mais conteúdo relacionado

Mais procurados

Introduction à ElasticSearch
Introduction à ElasticSearchIntroduction à ElasticSearch
Introduction à ElasticSearch
Fadel Chafai
 
Big Data Analytics Strategy and Roadmap
Big Data Analytics Strategy and RoadmapBig Data Analytics Strategy and Roadmap
Big Data Analytics Strategy and Roadmap
Srinath Perera
 

Mais procurados (20)

Design Beautiful REST + JSON APIs
Design Beautiful REST + JSON APIsDesign Beautiful REST + JSON APIs
Design Beautiful REST + JSON APIs
 
Présentation Talend Open Studio
Présentation Talend Open StudioPrésentation Talend Open Studio
Présentation Talend Open Studio
 
Data Vault Overview
Data Vault OverviewData Vault Overview
Data Vault Overview
 
Test
TestTest
Test
 
Azure Data Factory v2
Azure Data Factory v2Azure Data Factory v2
Azure Data Factory v2
 
REST API debate: OData vs GraphQL vs ORDS
REST API debate: OData vs GraphQL vs ORDSREST API debate: OData vs GraphQL vs ORDS
REST API debate: OData vs GraphQL vs ORDS
 
Etl -
Etl -Etl -
Etl -
 
Laravel - Speaking eloquent eloquently
Laravel - Speaking eloquent eloquentlyLaravel - Speaking eloquent eloquently
Laravel - Speaking eloquent eloquently
 
Introduction au Framework Laravel
Introduction au Framework LaravelIntroduction au Framework Laravel
Introduction au Framework Laravel
 
Introduction à ElasticSearch
Introduction à ElasticSearchIntroduction à ElasticSearch
Introduction à ElasticSearch
 
Session 14 - Hive
Session 14 - HiveSession 14 - Hive
Session 14 - Hive
 
Introduction à Laravel
Introduction à LaravelIntroduction à Laravel
Introduction à Laravel
 
Big Data Analytics Strategy and Roadmap
Big Data Analytics Strategy and RoadmapBig Data Analytics Strategy and Roadmap
Big Data Analytics Strategy and Roadmap
 
Integration de donnees_etl
Integration de donnees_etlIntegration de donnees_etl
Integration de donnees_etl
 
Operational Data Vault
Operational Data VaultOperational Data Vault
Operational Data Vault
 
Chapitre8: Collections et Enumerations En Java
Chapitre8: Collections et Enumerations En JavaChapitre8: Collections et Enumerations En Java
Chapitre8: Collections et Enumerations En Java
 
Introduction to Apache solr
Introduction to Apache solrIntroduction to Apache solr
Introduction to Apache solr
 
Laravel Eloquent ORM
Laravel Eloquent ORMLaravel Eloquent ORM
Laravel Eloquent ORM
 
A brief history of "big data"
A brief history of "big data"A brief history of "big data"
A brief history of "big data"
 
Formation JAVA/J2EE
Formation JAVA/J2EEFormation JAVA/J2EE
Formation JAVA/J2EE
 

Destaque

Архитектура хранилища бинарных данных на Одноклассниках (Александр Христофоро...
Архитектура хранилища бинарных данных на Одноклассниках (Александр Христофоро...Архитектура хранилища бинарных данных на Одноклассниках (Александр Христофоро...
Архитектура хранилища бинарных данных на Одноклассниках (Александр Христофоро...
Ontico
 

Destaque (20)

Marseille JUG Novembre 2013 Lucene Solr France Labs
Marseille JUG Novembre 2013 Lucene Solr France LabsMarseille JUG Novembre 2013 Lucene Solr France Labs
Marseille JUG Novembre 2013 Lucene Solr France Labs
 
Besoin de rien Envie de Search - Presentation Lucene Solr ElasticSearch
Besoin de rien Envie de Search - Presentation Lucene Solr ElasticSearchBesoin de rien Envie de Search - Presentation Lucene Solr ElasticSearch
Besoin de rien Envie de Search - Presentation Lucene Solr ElasticSearch
 
Introduction to Apache Solr
Introduction to Apache SolrIntroduction to Apache Solr
Introduction to Apache Solr
 
Solr + Hadoop - Fouillez facilement dans votre système Big Data
Solr + Hadoop - Fouillez facilement dans votre système Big DataSolr + Hadoop - Fouillez facilement dans votre système Big Data
Solr + Hadoop - Fouillez facilement dans votre système Big Data
 
Integrate ManifoldCF with Solr
Integrate ManifoldCF with SolrIntegrate ManifoldCF with Solr
Integrate ManifoldCF with Solr
 
T3UNI12 : SOLR workshop
T3UNI12 : SOLR workshopT3UNI12 : SOLR workshop
T3UNI12 : SOLR workshop
 
2015 webinar : Boostez la recherche pour vos applications et sites web avec l...
2015 webinar : Boostez la recherche pour vos applications et sites web avec l...2015 webinar : Boostez la recherche pour vos applications et sites web avec l...
2015 webinar : Boostez la recherche pour vos applications et sites web avec l...
 
PhD Defense Presentation - Soutenance de thèse
PhD Defense Presentation - Soutenance de thèse PhD Defense Presentation - Soutenance de thèse
PhD Defense Presentation - Soutenance de thèse
 
Migration d'Exalead vers Solr - IFCE et France Labs - Search Day 2014
Migration d'Exalead vers Solr - IFCE et France Labs - Search Day 2014Migration d'Exalead vers Solr - IFCE et France Labs - Search Day 2014
Migration d'Exalead vers Solr - IFCE et France Labs - Search Day 2014
 
Migrating to Alfresco Part II: The “How” – Tools & Best Practices for Renovat...
Migrating to Alfresco Part II: The “How” – Tools & Best Practices for Renovat...Migrating to Alfresco Part II: The “How” – Tools & Best Practices for Renovat...
Migrating to Alfresco Part II: The “How” – Tools & Best Practices for Renovat...
 
PhD Dissertation - Manuscrit de thèse de doctorat
PhD Dissertation - Manuscrit de thèse de doctoratPhD Dissertation - Manuscrit de thèse de doctorat
PhD Dissertation - Manuscrit de thèse de doctorat
 
State-of-the-Art Drupal Search with Apache Solr
State-of-the-Art Drupal Search with Apache SolrState-of-the-Art Drupal Search with Apache Solr
State-of-the-Art Drupal Search with Apache Solr
 
Ansible meetup-0915
Ansible meetup-0915Ansible meetup-0915
Ansible meetup-0915
 
SharePoint Search for Dummies
SharePoint Search for DummiesSharePoint Search for Dummies
SharePoint Search for Dummies
 
Concepts de Recherche dans un environnement WSS et MOSS
Concepts de Recherche dans un environnement WSS et MOSSConcepts de Recherche dans un environnement WSS et MOSS
Concepts de Recherche dans un environnement WSS et MOSS
 
Explorez vos données avec apache zeppelin
Explorez vos données avec apache zeppelinExplorez vos données avec apache zeppelin
Explorez vos données avec apache zeppelin
 
Архитектура хранилища бинарных данных на Одноклассниках (Александр Христофоро...
Архитектура хранилища бинарных данных на Одноклассниках (Александр Христофоро...Архитектура хранилища бинарных данных на Одноклассниках (Александр Христофоро...
Архитектура хранилища бинарных данных на Одноклассниках (Александр Христофоро...
 
Beyond full-text searches with Lucene and Solr
Beyond full-text searches with Lucene and SolrBeyond full-text searches with Lucene and Solr
Beyond full-text searches with Lucene and Solr
 
Drbd
DrbdDrbd
Drbd
 
Solr Presentation
Solr PresentationSolr Presentation
Solr Presentation
 

Semelhante a Apprendre Solr en deux heures

Tester les applications Zend Framework
Tester les applications Zend FrameworkTester les applications Zend Framework
Tester les applications Zend Framework
Mickael Perraud
 
Concevoir des applications pilotées par la recherche avec SharePoint 2010 et ...
Concevoir des applications pilotées par la recherche avec SharePoint 2010 et ...Concevoir des applications pilotées par la recherche avec SharePoint 2010 et ...
Concevoir des applications pilotées par la recherche avec SharePoint 2010 et ...
GSoft
 
Presentation Spring, Spring MVC
Presentation Spring, Spring MVCPresentation Spring, Spring MVC
Presentation Spring, Spring MVC
Nathaniel Richand
 
IPW 2eme course - HTML
IPW 2eme course - HTMLIPW 2eme course - HTML
IPW 2eme course - HTML
Vlad Posea
 

Semelhante a Apprendre Solr en deux heures (20)

Documents intéractifs
Documents intéractifsDocuments intéractifs
Documents intéractifs
 
Presentation solr 10 Aout 2011 (french)
Presentation solr 10 Aout 2011 (french)Presentation solr 10 Aout 2011 (french)
Presentation solr 10 Aout 2011 (french)
 
Spring 3.0
Spring 3.0Spring 3.0
Spring 3.0
 
Symfony2 - Un Framework PHP 5 Performant
Symfony2 - Un Framework PHP 5 PerformantSymfony2 - Un Framework PHP 5 Performant
Symfony2 - Un Framework PHP 5 Performant
 
Atelier template
Atelier templateAtelier template
Atelier template
 
Publication de documents sur le Web
Publication de documents sur le WebPublication de documents sur le Web
Publication de documents sur le Web
 
Resource Oriented Architecture
Resource Oriented ArchitectureResource Oriented Architecture
Resource Oriented Architecture
 
Jump Camp - HTML5
Jump Camp - HTML5Jump Camp - HTML5
Jump Camp - HTML5
 
Tester les applications Zend Framework
Tester les applications Zend FrameworkTester les applications Zend Framework
Tester les applications Zend Framework
 
Coat::Persistent at FPW2009
Coat::Persistent at FPW2009Coat::Persistent at FPW2009
Coat::Persistent at FPW2009
 
Association 2 0
Association 2 0Association 2 0
Association 2 0
 
Introduction au langage PHP (2éme partie) élaborée par Marouan OMEZZINE
Introduction au langage PHP (2éme partie) élaborée par Marouan OMEZZINEIntroduction au langage PHP (2éme partie) élaborée par Marouan OMEZZINE
Introduction au langage PHP (2éme partie) élaborée par Marouan OMEZZINE
 
Quoi de neuf dans Zend Framework 1.10 ?
Quoi de neuf dans Zend Framework 1.10 ?Quoi de neuf dans Zend Framework 1.10 ?
Quoi de neuf dans Zend Framework 1.10 ?
 
Structurer ses travaux SAS à l'aide de pages HTML, Joël Rivest
Structurer ses travaux SAS à l'aide de  pages HTML, Joël RivestStructurer ses travaux SAS à l'aide de  pages HTML, Joël Rivest
Structurer ses travaux SAS à l'aide de pages HTML, Joël Rivest
 
Concevoir des applications pilotées par la recherche avec SharePoint 2010 et ...
Concevoir des applications pilotées par la recherche avec SharePoint 2010 et ...Concevoir des applications pilotées par la recherche avec SharePoint 2010 et ...
Concevoir des applications pilotées par la recherche avec SharePoint 2010 et ...
 
Xquery
XqueryXquery
Xquery
 
Services rest & jersey
Services rest & jerseyServices rest & jersey
Services rest & jersey
 
Referencement et performance pour sites E-commerce
Referencement et performance pour sites E-commerceReferencement et performance pour sites E-commerce
Referencement et performance pour sites E-commerce
 
Presentation Spring, Spring MVC
Presentation Spring, Spring MVCPresentation Spring, Spring MVC
Presentation Spring, Spring MVC
 
IPW 2eme course - HTML
IPW 2eme course - HTMLIPW 2eme course - HTML
IPW 2eme course - HTML
 

Mais de Saïd Radhouani

Mais de Saïd Radhouani (13)

Anatomy of Search Relevance: From Data To Action
Anatomy of Search Relevance: From Data To ActionAnatomy of Search Relevance: From Data To Action
Anatomy of Search Relevance: From Data To Action
 
Conception de sites Web
Conception de sites WebConception de sites Web
Conception de sites Web
 
Introduction à XML
Introduction à XMLIntroduction à XML
Introduction à XML
 
Introduction à l\'e-learnining
Introduction à l\'e-learniningIntroduction à l\'e-learnining
Introduction à l\'e-learnining
 
Introduction à XML
Introduction à XMLIntroduction à XML
Introduction à XML
 
Active Server Pages (ASP)
Active Server Pages (ASP)Active Server Pages (ASP)
Active Server Pages (ASP)
 
Serveur Web (1)
Serveur Web (1)Serveur Web (1)
Serveur Web (1)
 
Serveur Web (2)
Serveur Web (2)Serveur Web (2)
Serveur Web (2)
 
SPIP
SPIPSPIP
SPIP
 
PHP &amp; MySQL
PHP &amp; MySQLPHP &amp; MySQL
PHP &amp; MySQL
 
Introduction à PHP
Introduction à PHPIntroduction à PHP
Introduction à PHP
 
Introduction aux technologies du Web (2)
Introduction aux technologies du Web (2)Introduction aux technologies du Web (2)
Introduction aux technologies du Web (2)
 
Introduction aux technologies du Web (1)
Introduction aux technologies du Web (1)Introduction aux technologies du Web (1)
Introduction aux technologies du Web (1)
 

Apprendre Solr en deux heures