SlideShare uma empresa Scribd logo
1 de 96
Paris Data Geek
                                                         Fév 2013




                      Elasticsearch.
                         Le moteur de recherche
                           élastique pour tous




    David Pilato, Elasticsearch.com, Paris

lundi 11 février 13
Qui ?

    $ curl http://localhost:9200/talk/speaker/dpilato
    {
     "nom" : "David Pilato",
     "jobs" : [
      { "boite" : "SRA Europe (SSII)", "mission" : "bon à tout faire", "date" : "1995" },
      { "boite" : "SFR", "mission" : "touche à tout", "date" : "1997" },
      { "boite" : "e-Brands / Vivendi", "mission" : "chef de projets", "date": "2000" },
      { "boite" : "DGDDI (douane)", "mission" : "mouton à 5 pattes", "date" : "2005" },
      { "boite" : "IDEO Technologies", "mission" : "directeur technique", "date" : "2012" },
      { "boite" : "Elasticsearch.com", "mission" : "technical advocate", "date" : "2013" } ],
     "passions" : [ "famille", "job", "deejay" ],
     "blog" : "http://dev.david.pilato.fr/",
     "twitter" : [ "@dadoonet", "@elasticsearchfr", "@scrutmydocs" ],
     "email" : "david@pilato.fr"
    }




lundi 11 février 13
Qui ?

    $ curl http://localhost:9200/talk/speaker/dpilato
    {
     "nom" : "David Pilato",
     "jobs" : [
      { "boite" : "SRA Europe (SSII)", "mission" : "bon à tout faire", "date" : "1995" },
      { "boite" : "SFR", "mission" : "touche à tout", "date" : "1997" },
      { "boite" : "e-Brands / Vivendi", "mission" : "chef de projets", "date": "2000" },
      { "boite" : "DGDDI (douane)", "mission" : "mouton à 5 pattes", "date" : "2005" },
      { "boite" : "IDEO Technologies", "mission" : "directeur technique", "date" : "2012" },
      { "boite" : "Elasticsearch.com", "mission" : "technical advocate", "date" : "2013" } ],
     "passions" : [ "famille", "job", "deejay" ],
     "blog" : "http://dev.david.pilato.fr/",
     "twitter" : [ "@dadoonet", "@elasticsearchfr", "@scrutmydocs" ],
     "email" : "david@pilato.fr"
    }




lundi 11 février 13
ScrutMyDocs.org




lundi 11 février 13
SQL Classique
                             Cherche moi un document
                      de décembre 2011 portant sur la france
                           et contenant produit et david
               En SQL :




lundi 11 février 13
SQL Classique
                             Cherche moi un document
                      de décembre 2011 portant sur la france
                           et contenant produit et david
               En SQL :
                SELECT
                  doc.*, pays.*
                FROM
                  doc, pays
                WHERE
                  doc.pays_code = pays.code AND
                  doc.date_doc > to_date('2011-12', 'yyyy-mm') AND
                  doc.date_doc < to_date('2012-01', 'yyyy-mm') AND
                  lower(pays.libelle) = 'france' AND
                  lower(doc.commentaire) LIKE ‘%produit%' AND
                  lower(doc.commentaire) LIKE ‘%david%';

lundi 11 février 13
Au final, on obtient




lundi 11 février 13
Un moteur de recherche
               • Un moteur de recherche est composé de :
                       • un moteur d’indexation de documents
                       • un moteur de recherche sur les index
               • De fait, un moteur de recherche est
                      énormément plus rapide qu’une base de
                      données pour faire des recherches :
                                 c’est son métier !


lundi 11 février 13
L’indexation, c’est quoi
                             en fait ?




lundi 11 février 13
Elasticsearch



lundi 11 février 13
Elasticsearch
                         Your Data, your Search !




lundi 11 février 13
Elasticsearch
                      • Moteur de recherche pour la génération NoSQL
                      • Basé sur le standard Apache Lucene
                      • Masque la complexité Java/Lucene à l’aide de
                        services standards HTTP / RESTful / JSON

                      • Utilisable à partir de n’importe quelle
                        technologie

                      • Ajoute la couche cloud manquante à Lucene
                      • C’est un moteur, pas une interface graphique !


lundi 11 février 13
Indexer
           $ curl -XPUT localhost:9200/twitter/tweet/1 -d '
           {
              "text": "Bienvenue à la conférence #elasticsearch pour #JUG",
              "created_at": "2012-04-06T20:45:36.000Z",
              "source": "Twitter for iPad",
              "truncated": false,
              "retweet_count": 0,
              "hashtag": [ { "text": "elasticsearch", "start": 27, "end": 40 },
                           { "text": "JUG", "start": 47, "end": 55 } ],
              "user": { "id": 51172224, "name": "David Pilato",
                        "screen_name": "dadoonet", "location": "France",
                        "description": "Soft Architect, Project Manager, Senior Developper.r
           nAt this time, enjoying NoSQL world : CouchDB, ElasticSearch.rnDeeJay 4 times a
           year, just for fun !" }
           }'




lundi 11 février 13
Indexer
           $ curl -XPUT localhost:9200/twitter/tweet/1 -d '
           {
              "text": "Bienvenue à la conférence #elasticsearch pour #JUG",
              "created_at": "2012-04-06T20:45:36.000Z",
              "source": "Twitter for iPad",
              "truncated": false,
              "retweet_count": 0,
              "hashtag": [ { "text": "elasticsearch", "start": 27, "end": 40 },
                           { "text": "JUG", "start": 47, "end": 55 } ],
              "user": { "id": 51172224, "name": "David Pilato",
                        "screen_name": "dadoonet", "location": "France",
                        "description": "Soft Architect, Project Manager, Senior Developper.r
           nAt this time, enjoying NoSQL world : CouchDB, ElasticSearch.rnDeeJay 4 times a
           year, just for fun !" }
           }'




           {
            "ok":true,
            "_index":"twitter",
            "_type":"tweet",
            "_id":"1"
           }



lundi 11 février 13
Chercher
                $ curl localhost:9200/twitter/tweet/_search?q=elasticsearch




lundi 11 février 13
Chercher
                 $ curl localhost:9200/twitter/tweet/_search?q=elasticsearch




             {
                  "took" : 24,
                  "timed_out" : false,
                  "_shards" : { "total" : 5, "successful" : 5, "failed" : 0 },
                  "hits" : {
                    "total" : 1,
                    "max_score" : 0.227,
                    "hits" : [ {
                      "_index" : "twitter",
                      "_type" : "tweet",
                      "_id" : "1",
                      "_score" : 0.227, "_source" : {
                        "text": "Bienvenue à la conférence #elasticsearch pour #JUG",
                        "created_at": "2012-04-06T20:45:36.000Z",
                        "source": "Twitter for iPad",
                        […]
                      }
                    } ]
                  }
             }


lundi 11 février 13
Chercher
                 $ curl localhost:9200/twitter/tweet/_search?q=elasticsearch




             {
                  "took" : 24,                      Nb de
                  "timed_out" : false,
                                                  documents
                  "_shards" : { "total" : 5, "successful" : 5, "failed" : 0 },
                  "hits" : {
                    "total" : 1,
                    "max_score" : 0.227,
                    "hits" : [ {
                      "_index" : "twitter",
                      "_type" : "tweet",
                      "_id" : "1",
                      "_score" : 0.227, "_source" : {
                        "text": "Bienvenue à la conférence #elasticsearch pour #JUG",
                        "created_at": "2012-04-06T20:45:36.000Z",
                        "source": "Twitter for iPad",
                        […]
                      }
                    } ]
                  }
             }


lundi 11 février 13
Chercher
                 $ curl localhost:9200/twitter/tweet/_search?q=elasticsearch




             {
                  "took" : 24,
                  "timed_out" : false,
                  "_shards" : { "total" : 5, "successful" : 5, "failed" : 0 },
                  "hits" : {
                    "total" : 1,
                    "max_score" : 0.227,
                    "hits" : [ {                          Coordonnées
                      "_index" : "twitter",
                      "_type" : "tweet",
                      "_id" : "1",
                      "_score" : 0.227, "_source" : {
                        "text": "Bienvenue à la conférence #elasticsearch pour #JUG",
                        "created_at": "2012-04-06T20:45:36.000Z",
                        "source": "Twitter for iPad",
                        […]
                      }
                    } ]
                  }
             }


lundi 11 février 13
Chercher
                 $ curl localhost:9200/twitter/tweet/_search?q=elasticsearch




             {
                  "took" : 24,
                  "timed_out" : false,
                  "_shards" : { "total" : 5, "successful" : 5, "failed" : 0 },
                  "hits" : {
                    "total" : 1,
                    "max_score" : 0.227,
                    "hits" : [ {
                      "_index" : "twitter",
                      "_type" : "tweet",
                      "_id" : "1",
                      "_score" : 0.227, "_source" : {
                        "text": "Bienvenue à la conférence #elasticsearch pour #JUG",
                        "created_at": "2012-04-06T20:45:36.000Z",
                        "source": "Twitter for iPad",
                        […]
                      }                               Pertinence
                    } ]
                  }
             }


lundi 11 février 13
Chercher
                 $ curl localhost:9200/twitter/tweet/_search?q=elasticsearch




             {
                  "took" : 24,
                  "timed_out" : false,
                  "_shards" : { "total" : 5, "successful" : 5, "failed" : 0 },
                  "hits" : {
                    "total" : 1,                                           Document
                    "max_score" : 0.227,
                    "hits" : [ {
                                                                            source
                      "_index" : "twitter",
                      "_type" : "tweet",
                      "_id" : "1",
                      "_score" : 0.227, "_source" : {
                        "text": "Bienvenue à la conférence #elasticsearch pour #JUG",
                        "created_at": "2012-04-06T20:45:36.000Z",
                        "source": "Twitter for iPad",
                        […]
                      }
                    } ]
                  }
             }


lundi 11 février 13
Query DSL
                      • Requêtes précises : plutôt que de
                        chercher « à la google », on peut
                        utiliser des critères précis :




lundi 11 février 13
Query DSL
                      • Requêtes précises : plutôt que de
                        chercher « à la google », on peut
                        utiliser des critères précis :
                        $ curl -XPOST localhost:9200/twitter/tweet/_search -d ’{
                            "bool" : {
                                "must" : {
                                    "term" : { "user" : "kimchy" }
                                },
                                "must_not" : {
                                    "range" : {
                                        "age" : { "from" : 10, "to" : 20 }
                                    }
                                },
                                "should" : [
                                    {
                                        "term" : { "tag" : "wow" }
                                    },{
                                        "match" : { "tag" : "elasticsearch is cool" }
                                    }
                                ]
                            }
                        }’

lundi 11 février 13
Analyser
                                    La puissance des facettes !
                      Faites parler vos données en les regardant sous différentes facettes !
                                     (Et en temps quasi réel, s’il vous plait !)




lundi 11 février 13
Des tweets

                      ID    Username          Date      Hashtag
                      1     dadoonet       2012-04-18     1
                      2        talk        2012-04-18     5
                      3    elasticsearch   2012-04-18     2
                      4     dadoonet       2012-04-18     2
                      5        talk        2012-04-18     6
                      6    elasticsearch   2012-04-19     3
                      7     dadoonet       2012-04-19     3
                      8        talk        2012-04-19     7
                      9    elasticsearch   2012-04-20     4



lundi 11 février 13
Term Facet

D                 Username          Date      Hashtag
1                  dadoonet      2012-04-18     1
2                   talktalk     2012-04-18     5
3             elasticsearch      2012-04-18     2
4                  dadoonet      2012-04-18     2
5                         talk   2012-04-18     6
6             elasticsearch      2012-04-19     3
7                  dadoonet      2012-04-19     3
8                         talk   2012-04-19     7
9             elasticsearch      2012-04-20     4



    lundi 11 février 13
Term Facet

D                 Username          Date             Hashtag
1                  dadoonet      2012-04-18            1
2                   talktalk     2012-04-18            5
3             elasticsearch      2012-04-18Username 2          Count
4                  dadoonet      2012-04-18dadoonet    2        3
5                         talk   2012-04-18   talk     6        3
6             elasticsearch      2012-04-19
                                         elasticsearch 3        3
7                  dadoonet      2012-04-19            3
8                         talk   2012-04-19            7
9             elasticsearch      2012-04-20            4



    lundi 11 février 13
Term Facet

D                 Username          Date      Hashtag
1                  dadoonet      2012-04-18     1
2                         talk   2012-04-18     5
3             elasticsearch      2012-04-18     2
4                  dadoonet      2012-04-18     2
5                         talk   2012-04-18     6
6             elasticsearch      2012-04-19     3
7                  dadoonet      2012-04-19     3
8                         talk   2012-04-19     7
9             elasticsearch      2012-04-20     4



    lundi 11 février 13
Term Facet

D                 Username          Date            Hashtag
1                  dadoonet      2012-04-18
                                         "facets" : {    1
                                           "users" : { "terms" : {"field" : "username"} }
                                        }
2                         talk   2012-04-18             5
3             elasticsearch      2012-04-18             2
4                  dadoonet      2012-04-18             2
5                         talk   2012-04-18             6
6             elasticsearch      2012-04-19             3
7                  dadoonet      2012-04-19             3
8                         talk   2012-04-19             7
9             elasticsearch      2012-04-20             4



    lundi 11 février 13
Term Facet

D                 Username          Date             Hashtag
1                  dadoonet      2012-04-18
                                         "facets" : {    1
                                           "users" : { "terms" : {"field" : "username"} }
                                        }
2                         talk   2012-04-18              5
                                       "facets" : {
3             elasticsearch      2012-04-18
                                         "users" : {     2
                                           "_type" : "terms",
4                  dadoonet      2012-04-18"missing" : 0,2
                                           "total": 9,
5                         talk   2012-04-18"other": 0,   6
                                           "terms" : [
6             elasticsearch      2012-04-19 { "term" : "dadoonet", "count" },3 },
                                                         3
                                             { "term" : "talk", "count" : 3
                                                                            :

                                             { "term" : "elasticsearch", "count" : 3 }
7                  dadoonet      2012-04-19]             3
                                         }
8                         talk   2012-04-19
                                       }                 7
9             elasticsearch      2012-04-20              4



    lundi 11 février 13
Date Histogram Facet

                      Date   Hashtag
            2012-04-18         1
            2012-04-18         5
h           2012-04-18         2
            2012-04-18         2
            2012-04-18         6
h           2012-04-19         3
            2012-04-19         3
            2012-04-19         7
h           2012-04-20         4



lundi 11 février 13
Date Histogram Facet

                      Date   Hashtag
            2012-04-18         1                 Par mois
            2012-04-18         5        Date                Count
h           2012-04-18         2       2012-04               9
            2012-04-18         2
            2012-04-18         6
h           2012-04-19         3
            2012-04-19         3
            2012-04-19         7
h           2012-04-20         4



lundi 11 février 13
Date Histogram Facet

                      Date   Hashtag
            2012-04-18         1                  Par mois
            2012-04-18         5          Date               Count
h           2012-04-18         2        2012-04               9
            2012-04-18         2
            2012-04-18         6                  Par jour
h           2012-04-19         3          Date               Count
            2012-04-19         3       2012-04-18             5
            2012-04-19         7       2012-04-19             3
h           2012-04-20         4       2012-04-20             1



lundi 11 février 13
Date Histogram Facet

                      Date   Hashtag
            2012-04-18         1
            2012-04-18         5
h           2012-04-18         2
            2012-04-18         2
            2012-04-18         6
h           2012-04-19         3
            2012-04-19         3
            2012-04-19         7
h           2012-04-20         4



lundi 11 février 13
Date Histogram Facet

                      Date   Hashtag
                                   "facets" : {
            2012-04-18         1     "perday" : {
                                       "date_histogram" : {
            2012-04-18         5         "field" : "date",
                                         "interval" : "day"
                                       }
h           2012-04-18         2     }
                                   }
            2012-04-18         2
            2012-04-18         6
h           2012-04-19         3
            2012-04-19         3
            2012-04-19         7
h           2012-04-20         4



lundi 11 février 13
Date Histogram Facet

                      Date   Hashtag
                                   "facets" : {
            2012-04-18         1     "perday" : {
                                       "date_histogram" : {
            2012-04-18         5         "field" : "date",
                                         "interval" : "day"
                                       }
h           2012-04-18         2     }
                                   }
            2012-04-18         2
                                 "facets" : {
            2012-04-18         6 "perday" : {
                                     "_type" : "date_histogram",
h           2012-04-19         3     "entries": [
                                       { "time": 1334700000000, "count": 5 },
            2012-04-19         3       { "time": 1334786400000, "count": 3 },
                                       { "time": 1334872800000, "count": 1 }
            2012-04-19         7 } ]
                                 }
h           2012-04-20         4



lundi 11 février 13
Range Facet

                 Hashtag
                      1
                      5
                      2
                      2
                      6
                      3
                      3
                      7
                      4



lundi 11 février 13
Range Facet

                 Hashtag
                      1
                      5
                      2     Hashtag      Count   Min   Max   Moy     Total
                      2       x<3         3      1      2    1.667    5
                      6     3 <= x < 5    3      3      4    3.333    10
                      3      x >= 5       3      5      7     6       18
                      3
                      7
                      4



lundi 11 février 13
Range Facet

                 Hashtag
                      1
                      5
                      2
                      2
                      6
                      3
                      3
                      7
                      4



lundi 11 février 13
Range Facet
                             "facets" : { "hashtags" : {
                               "range" : { "field" : "hashtag",
                               "ranges" : [
                                  { "to" : 3 },
                 Hashtag          { "from" : 3, "to" : 5 },
                                  { "from" : 5 }
                               ] } } }
                      1
                      5
                      2
                      2
                      6
                      3
                      3
                      7
                      4



lundi 11 février 13
Range Facet
                              "facets" : { "hashtags" : {
                                "range" : { "field" : "hashtag",
                                "ranges" : [
                                   { "to" : 3 },
                 Hashtag           { "from" : 3, "to" : 5 },
                                   { "from" : 5 }
                                ] } } }
                      1
                            "facets" : {
                      5       "hashtags" : {
                                "_type" : "range",
                      2         "ranges" : [ {
                                    "to": 3,
                      2             "count": 3,
                                    "min": 1, "max": 2,
                      6             "total": 5, "mean": 1.667
                                  }, {
                                    "from":3, "to" : 5,
                      3             "count": 3,
                                    "min": 3, "max": 4,
                      3             "total": 10, "mean": 3.333
                                  },{
                      7             "from":5,
                                    "count": 3,
                      4             "min": 5, "max": 7,
                                    "total": 18, "mean": 6
                                  } ] } }



lundi 11 février 13
Site marchand




lundi 11 février 13
Site marchand




lundi 11 février 13
Site marchand




lundi 11 février 13
Site marchand




lundi 11 février 13
Site marchand

                            Ranges




                            Term




                            Term




                           Ranges
lundi 11 février 13
Analyse temps-réel
                      • Faire un matchAll sur l'ensemble des données
                      • Actualiser toutes les x secondes
                      • Indexer en même temps les nouvelles données

                                                              Date histogram



                                                              Term




lundi 11 février 13
Facettes
                      Cartographiques




lundi 11 février 13
Reprenons notre
                        formulaire




lundi 11 février 13
Reprenons notre
                        formulaire

                                 Recherche Full Text




lundi 11 février 13
Reprenons notre
                        formulaire




lundi 11 février 13
Reprenons notre
                        formulaire




lundi 11 février 13
Démonstration
                        http://onemilliontweetmap.com/
                      http://www.francetvinfo.fr/en-direct/
                      http://localhost:9200/_plugin/demo/




lundi 11 février 13
Architecture
                      Un peu plus de technique : partitions / réplications / scalabilité




lundi 11 février 13
Lexique




lundi 11 février 13
Lexique
                      • Nœud (node) : Une instance d'Elasticsearch
                        (~ machine ?)




lundi 11 février 13
Lexique
                      • Nœud (node) : Une instance d'Elasticsearch
                        (~ machine ?)

                      • Cluster : Un ensemble de nœuds




lundi 11 février 13
Lexique
                      • Nœud (node) : Une instance d'Elasticsearch
                        (~ machine ?)

                      • Cluster : Un ensemble de nœuds
                      • Partition (shard) : permet de découper un
                        index en plusieurs parties pour y distribuer
                        les documents




lundi 11 février 13
Lexique
                      • Nœud (node) : Une instance d'Elasticsearch
                        (~ machine ?)

                      • Cluster : Un ensemble de nœuds
                      • Partition (shard) : permet de découper un
                        index en plusieurs parties pour y distribuer
                        les documents

                      • Réplication (replica) : recopie d’une
                        partition en une ou plusieurs copies dans
                        l'ensemble du cluster


lundi 11 février 13
Créons un index


                                          Cluster

                                 Nœud 1




                                           Client
                                           CURL




lundi 11 février 13
Créons un index


              $ curl -XPUT localhost:9200/twitter -d '{                                  Cluster
                   "index" : {
                                                                               Nœud 1
                       "number_of_shards" : 2,
                       "number_of_replicas" : 1                                Shard 0

                   }
                                                                               Shard 1
              }'




                                                   réplication non respectée
                                                                                          Client
                                                                                          CURL




lundi 11 février 13
Créons un index


              $ curl -XPUT localhost:9200/twitter -d '{                                Cluster
                   "index" : {
                                                                             Nœud 1              Nœud 2
                       "number_of_shards" : 2,
                       "number_of_replicas" : 1                              Shard 0             Shard 0
                   }
              }'                                                             Shard 1             Shard 1




                                                     réplication respectée
                                                                                        Client
                                                                                        CURL




lundi 11 février 13
Réallocation dynamique


                                             Cluster

                         Nœud 1    Nœud 2
                         Shard 0   Shard 0


                         Shard 1   Shard 1




lundi 11 février 13
Réallocation dynamique


                                             Cluster

                         Nœud 1    Nœud 2              Nœud 3
                         Shard 0   Shard 0


                         Shard 1   Shard 1




lundi 11 février 13
Réallocation dynamique


                                             Cluster

                         Nœud 1    Nœud 2              Nœud 3
                         Shard 0   Shard 0              Shard 0


                         Shard 1   Shard 1




lundi 11 février 13
Réallocation dynamique


                                             Cluster

                         Nœud 1    Nœud 2              Nœud 3
                         Shard 0                        Shard 0


                         Shard 1   Shard 1




lundi 11 février 13
Réallocation dynamique


                                             Cluster

                         Nœud 1    Nœud 2              Nœud 3
                         Shard 0                        Shard 0


                         Shard 1   Shard 1




lundi 11 février 13
Réallocation dynamique


                                             Cluster

                         Nœud 1    Nœud 2              Nœud 3     Nœud 4
                         Shard 0                        Shard 0


                         Shard 1   Shard 1




lundi 11 février 13
Réallocation dynamique


                                             Cluster

                         Nœud 1    Nœud 2              Nœud 3     Nœud 4
                         Shard 0                        Shard 0


                         Shard 1   Shard 1                        Shard 1




lundi 11 février 13
Réallocation dynamique


                                                 Cluster

                             Nœud 1    Nœud 2              Nœud 3     Nœud 4
                             Shard 0                        Shard 0


                                       Shard 1                        Shard 1




                       Le tuning, c'est trouver le bon équilibre entre le
                          nombre de nodes, shards et replicas !



lundi 11 février 13
Indexons un document

                                                             Cluster

                         Nœud 1                Nœud 2                     Nœud 3               Nœud 4
                         Shard 0                                           Shard 0


                                               Shard 1                                          Shard 1




                                   Doc
                                    1 Client         $ curl -XPUT localhost:9200/twitter/tweet/1 -d '
                                      CURL           {
                                                          "text": "Bienvenue à la conférence #elasticsearch pour #JUG",
                                                          "created_at": "2012-04-06T20:45:36.000Z",
                                                          "source": "Twitter for iPad",
                                                          ...
                                                     }'




lundi 11 février 13
Indexons un document

                                                                Cluster

                         Nœud 1                   Nœud 2                     Nœud 3               Nœud 4
                                   Doc
                         Shard 0    1                                         Shard 0


                                                  Shard 1                                          Shard 1




                                         Client         $ curl -XPUT localhost:9200/twitter/tweet/1 -d '
                                         CURL           {
                                                             "text": "Bienvenue à la conférence #elasticsearch pour #JUG",
                                                             "created_at": "2012-04-06T20:45:36.000Z",
                                                             "source": "Twitter for iPad",
                                                             ...
                                                        }'




lundi 11 février 13
Indexons un document

                                                                Cluster

                         Nœud 1                   Nœud 2                     Nœud 3               Nœud 4
                                   Doc
                         Shard 0    1                                         Shard 0


                                                  Shard 1                                          Shard 1




                                         Client         $ curl -XPUT localhost:9200/twitter/tweet/1 -d '
                                         CURL           {
                                                             "text": "Bienvenue à la conférence #elasticsearch pour #JUG",
                                                             "created_at": "2012-04-06T20:45:36.000Z",
                                                             "source": "Twitter for iPad",
                                                             ...
                                                        }'




lundi 11 février 13
Indexons un document

                                                                Cluster

                         Nœud 1                   Nœud 2                     Nœud 3               Nœud 4
                                   Doc                                                  Doc
                         Shard 0    1                                         Shard 0    1


                                                  Shard 1                                          Shard 1




                                         Client         $ curl -XPUT localhost:9200/twitter/tweet/1 -d '
                                         CURL           {
                                                             "text": "Bienvenue à la conférence #elasticsearch pour #JUG",
                                                             "created_at": "2012-04-06T20:45:36.000Z",
                                                             "source": "Twitter for iPad",
                                                             ...
                                                        }'




lundi 11 février 13
Indexons un                                                           2ème

                         document
                                                              Cluster

                      Nœud 1                    Nœud 2                     Nœud 3               Nœud 4
                                 Doc                                                  Doc
                       Shard 0    1                                         Shard 0    1


                                                Shard 1                                          Shard 1




                                 Doc
                                  2
                                       Client         $ curl -XPUT localhost:9200/twitter/tweet/2 -d '
                                       CURL           {
                                                           "text": "Je fais du bruit pour #elasticsearch à #JUG",
                                                           "created_at": "2012-04-06T21:12:52.000Z",
                                                           "source": "Twitter for iPad",
                                                           ...
                                                      }'




lundi 11 février 13
Indexons un                                                           2ème

                         document
                                                              Cluster

                      Nœud 1                    Nœud 2                     Nœud 3               Nœud 4
                                 Doc                                                  Doc
                       Shard 0    1                                         Shard 0    1


                                                Shard 1                                          Shard 1
                         Doc
                          2




                                       Client         $ curl -XPUT localhost:9200/twitter/tweet/2 -d '
                                       CURL           {
                                                           "text": "Je fais du bruit pour #elasticsearch à #JUG",
                                                           "created_at": "2012-04-06T21:12:52.000Z",
                                                           "source": "Twitter for iPad",
                                                           ...
                                                      }'




lundi 11 février 13
Indexons un                                                           2ème

                         document
                                                              Cluster

                      Nœud 1                    Nœud 2                     Nœud 3               Nœud 4
                                 Doc                                                  Doc
                       Shard 0    1                                         Shard 0    1


                                                Shard 1    Doc                                   Shard 1
                                                            2




                                       Client         $ curl -XPUT localhost:9200/twitter/tweet/2 -d '
                                       CURL           {
                                                           "text": "Je fais du bruit pour #elasticsearch à #JUG",
                                                           "created_at": "2012-04-06T21:12:52.000Z",
                                                           "source": "Twitter for iPad",
                                                           ...
                                                      }'




lundi 11 février 13
Indexons un                                                           2ème

                         document
                                                              Cluster

                      Nœud 1                    Nœud 2                     Nœud 3               Nœud 4
                                 Doc                                                  Doc
                       Shard 0    1                                         Shard 0    1


                                                Shard 1    Doc                                   Shard 1
                                                            2




                                       Client         $ curl -XPUT localhost:9200/twitter/tweet/2 -d '
                                       CURL           {
                                                           "text": "Je fais du bruit pour #elasticsearch à #JUG",
                                                           "created_at": "2012-04-06T21:12:52.000Z",
                                                           "source": "Twitter for iPad",
                                                           ...
                                                      }'




lundi 11 février 13
Indexons un                                                           2ème

                         document
                                                              Cluster

                      Nœud 1                    Nœud 2                     Nœud 3               Nœud 4
                                 Doc                                                  Doc
                       Shard 0    1                                         Shard 0    1


                                                           Doc                                             Doc
                                                Shard 1                                          Shard 1
                                                            2                                               2




                                       Client         $ curl -XPUT localhost:9200/twitter/tweet/2 -d '
                                       CURL           {
                                                           "text": "Je fais du bruit pour #elasticsearch à #JUG",
                                                           "created_at": "2012-04-06T21:12:52.000Z",
                                                           "source": "Twitter for iPad",
                                                           ...
                                                      }'




lundi 11 février 13
Cherchons !

                                                           Cluster

                      Nœud 1                   Nœud 2                Nœud 3          Nœud 4
                                Doc                                            Doc
                      Shard 0    1                                   Shard 0    1


                                                         Doc                                   Doc
                                               Shard 1                               Shard 1
                                                          2                                     2




                                      Client
                                               $ curl localhost:9200/twitter/_search?q=elasticsearch
                                      CURL




lundi 11 février 13
Cherchons !

                                                           Cluster

                      Nœud 1                   Nœud 2                Nœud 3          Nœud 4
                                Doc                                            Doc
                      Shard 0    1                                   Shard 0    1


                                                         Doc                                   Doc
                                               Shard 1                               Shard 1
                                                          2                                     2




                                      Client
                                               $ curl localhost:9200/twitter/_search?q=elasticsearch
                                      CURL




lundi 11 février 13
Cherchons !

                                                     Cluster

                      Nœud 1               Nœud 2              Nœud 3          Nœud 4
                                                                         Doc
                       Shard 0                                 Shard 0    1


                                                                                         Doc
                                           Shard 1                             Shard 1
                      Doc                                                                 2
                            Doc
                       1     2




                                  Client
                                           $ curl localhost:9200/twitter/_search?q=elasticsearch
                                  CURL




lundi 11 février 13
Cherchons !

                                                         Cluster

                      Nœud 1                   Nœud 2              Nœud 3          Nœud 4
                                                                             Doc
                      Shard 0                                      Shard 0    1


                                                                                             Doc
                                               Shard 1                             Shard 1
                                                                                              2




                                        Doc
                                Doc      2
                                 1
                                      Client
                                               $ curl localhost:9200/twitter/_search?q=elasticsearch
                                      CURL




lundi 11 février 13
Cherchons !

                                               {
                                                           Cluster
                                                   "took" : 24,
                      Nœud 1                    "timed_out" : false,Nœud 3
                                               Nœud 2                                  Nœud 4
                                                 "_shards" : { "total" : 5, "successful" : 5, "failed" : 0 },
                                                                                Doc
                      Shard 0                    "hits" : {             Shard 0 1
                                                    "total" : 2,
                                                    "max_score" : 0.227,                          Doc
                                                Shard 1
                                                    "hits" : [ {                          Shard 1
                                                                                                   2
                                                       "_index" : "twitter",
                                                       "_type" : "tweet",
                                                       "_id" : "1",
                                                       "_score" : 0.227, "_source" : { ... }
                                        Doc         }, {
                                Doc      2             "_index" : "twitter",
                                 1
                                      Client           "_type" : "tweet",
                                               $ curl localhost:9200/twitter/_search?q=elasticsearch
                                      CURL             "_id" : "2",
                                                       "_score" : 0.152, "_source" : { ... }
                                                    } ]
                                                 }




lundi 11 février 13
Cherchons encore !

                                                             Cluster

                        Nœud 1                   Nœud 2                Nœud 3          Nœud 4
                                  Doc                                            Doc
                        Shard 0    1                                   Shard 0    1


                                                           Doc                                   Doc
                                                 Shard 1                               Shard 1
                                                            2                                     2




                                        Client
                                                 $ curl localhost:9200/twitter/_search?q=elasticsearch
                                        CURL




lundi 11 février 13
Cherchons encore !

                                                             Cluster

                        Nœud 1                   Nœud 2                Nœud 3          Nœud 4
                                  Doc                                            Doc
                        Shard 0    1                                   Shard 0    1


                                                           Doc                                   Doc
                                                 Shard 1                               Shard 1
                                                            2                                     2




                                        Client
                                                 $ curl localhost:9200/twitter/_search?q=elasticsearch
                                        CURL




lundi 11 février 13
Cherchons encore !

                                                             Cluster

                        Nœud 1                   Nœud 2                Nœud 3       Nœud 4
                                  Doc
                        Shard 0    1                                   Shard 0
                                                   Doc
                                                    1
                                                 Shard 1   Doc         Doc           Shard 1
                                                            2           2




                                        Client
                                                 $ curl localhost:9200/twitter/_search?q=elasticsearch
                                        CURL




lundi 11 février 13
Cherchons encore !

                                                             Cluster

                        Nœud 1                   Nœud 2                Nœud 3
                                  Doc
                        Shard 0    1                                   Shard 0
                                                   Doc
                                                    1
                                                 Shard 1   Doc
                                                            2




                                        Client
                                                 $ curl localhost:9200/twitter/_search?q=elasticsearch
                                        CURL




lundi 11 février 13
Cherchons encore !

                                                             Cluster

                        Nœud 1                   Nœud 2                Nœud 3
                                  Doc
                        Shard 0    1                                   Shard 0
                                                   Doc
                                                    1
                                                 Shard 1   Doc
                                                            2




                                        Client
                                                 $ curl localhost:9200/twitter/_search?q=elasticsearch
                                        CURL




lundi 11 février 13
Cherchons encore !

                                                           Cluster

                        Nœud 1                   Nœud 2              Nœud 3
                                  Doc
                        Shard 0    1                                 Shard 0


                                                 Shard 1
                         Doc      Doc
                          1        2




                                        Client
                                                 $ curl localhost:9200/twitter/_search?q=elasticsearch
                                        CURL




lundi 11 février 13
Cherchons encore !

                                                         Cluster

                        Nœud 1                 Nœud 2              Nœud 3
                                  Doc
                        Shard 0    1                               Shard 0


                                               Shard 1




                                         Doc
                                  Doc     2
                                   1 Client
                                               $ curl localhost:9200/twitter/_search?q=elasticsearch
                                        CURL




lundi 11 février 13
Cherchons encore !

                                               {
                                                           Cluster
                                                   "took" : 24,
                        Nœud 1                  "timed_out" : false,Nœud 3
                                               Nœud 2
                                                 "_shards" : { "total" : 5, "successful" : 5, "failed" : 0 },
                                  Doc
                        Shard 0    1             "hits" : {             Shard 0
                                                    "total" : 2,
                                                    "max_score" : 0.227,
                                                Shard 1
                                                    "hits" : [ {
                                                       "_index" : "twitter",
                                                       "_type" : "tweet",
                                                       "_id" : "1",
                                                       "_score" : 0.227, "_source" : { ... }
                                         Doc        }, {
                                          2
                                  Doc                  "_index" : "twitter",
                                   1 Client
                                                       "_type" : "tweet",
                                               $ curl localhost:9200/twitter/_search?q=elasticsearch
                                        CURL           "_id" : "2",
                                                       "_score" : 0.152, "_source" : { ... }
                                                    } ]
                                                 }




lundi 11 février 13
La communauté




                      ~100 contributeurs directs au projet (+ de 3200 watchers et + de 620 forks)
lundi 11 février 13
La communauté




                      ~100 contributeurs directs au projet (+ de 3200 watchers et + de 620 forks)
lundi 11 février 13
La communauté




                      ~170 inscrits sur la mailing list, 70 messages / mois, ~270 followers
lundi 11 février 13
lundi 11 février 13
Rejoignez le mouvement !
                        @ElasticsearchFR
                                                                                       www.elasticsearch.fr




                                                                             ss
                                                                           re
                                                                        og
                                                                      pr
                                                                   in




                      Questions ?
                      Posez aussi vos questions sur elasticsearch-fr@googlegroups.com
                                                 Prochaines rencontres sur http://www.meetup.com/elasticsearchfr/

              Slides sur http://fr.slideshare.net/dadoonet                           Sources sur https://github.com/elasticsearchfr/talks
lundi 11 février 13

Mais conteúdo relacionado

Mais procurados

Lyon JUG - Elasticsearch
Lyon JUG - ElasticsearchLyon JUG - Elasticsearch
Lyon JUG - ElasticsearchDavid Pilato
 
Elasticsearch - OSDC France 2012
Elasticsearch - OSDC France 2012Elasticsearch - OSDC France 2012
Elasticsearch - OSDC France 2012David Pilato
 
Breizhcamp 2015 - Comment (ne pas réussir à) modéliser ses data dans elastics...
Breizhcamp 2015 - Comment (ne pas réussir à) modéliser ses data dans elastics...Breizhcamp 2015 - Comment (ne pas réussir à) modéliser ses data dans elastics...
Breizhcamp 2015 - Comment (ne pas réussir à) modéliser ses data dans elastics...Bruno Bonnin
 
Présentation de ElasticSearch / Digital apéro du 12/11/2014
Présentation de ElasticSearch / Digital apéro du 12/11/2014Présentation de ElasticSearch / Digital apéro du 12/11/2014
Présentation de ElasticSearch / Digital apéro du 12/11/2014Silicon Comté
 
Elasticsearch - Devoxx France 2012
Elasticsearch - Devoxx France 2012Elasticsearch - Devoxx France 2012
Elasticsearch - Devoxx France 2012David Pilato
 
Migrer une application existante vers Elasticsearch - Nuxeo Tour 2014 - workshop
Migrer une application existante vers Elasticsearch - Nuxeo Tour 2014 - workshopMigrer une application existante vers Elasticsearch - Nuxeo Tour 2014 - workshop
Migrer une application existante vers Elasticsearch - Nuxeo Tour 2014 - workshopNuxeo
 
Tunis big data_meetup__21_nov2015__aymenzaafouri
Tunis big data_meetup__21_nov2015__aymenzaafouriTunis big data_meetup__21_nov2015__aymenzaafouri
Tunis big data_meetup__21_nov2015__aymenzaafouriAymen ZAAFOURI
 
Introduction à ElasticSearch
Introduction à ElasticSearchIntroduction à ElasticSearch
Introduction à ElasticSearchFadel Chafai
 
[Breizhcamp 2015] MongoDB et Elastic, meilleurs ennemis ?
[Breizhcamp 2015] MongoDB et Elastic, meilleurs ennemis ?[Breizhcamp 2015] MongoDB et Elastic, meilleurs ennemis ?
[Breizhcamp 2015] MongoDB et Elastic, meilleurs ennemis ?Sébastien Prunier
 
Découverte de Elastic search
Découverte de Elastic searchDécouverte de Elastic search
Découverte de Elastic searchJEMLI Fathi
 
MongoDB : la base NoSQL qui réinvente la gestion de données
MongoDB : la base NoSQL qui réinvente la gestion de donnéesMongoDB : la base NoSQL qui réinvente la gestion de données
MongoDB : la base NoSQL qui réinvente la gestion de donnéesSOAT
 
Solr and Elasticsearch in Action (at Breizhcamp)
Solr and Elasticsearch in Action (at Breizhcamp)Solr and Elasticsearch in Action (at Breizhcamp)
Solr and Elasticsearch in Action (at Breizhcamp)Lucian Precup
 
Tout ce que le getting started mongo db ne vous dira pas
Tout ce que le getting started mongo db ne vous dira pasTout ce que le getting started mongo db ne vous dira pas
Tout ce que le getting started mongo db ne vous dira pasPierre-Alban DEWITTE
 
Atelier : Développement rapide d&rsquo;une application basée surXWiki
Atelier : Développement rapide d&rsquo;une application basée surXWikiAtelier : Développement rapide d&rsquo;une application basée surXWiki
Atelier : Développement rapide d&rsquo;une application basée surXWikiKorteby Farouk
 
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 ElasticSearchfrancelabs
 
Jug algeria x wiki-atelier
Jug algeria x wiki-atelierJug algeria x wiki-atelier
Jug algeria x wiki-atelierAlgeria JUG
 
Oxalide Workshop #3 - Elasticearch, an overview
Oxalide Workshop #3 - Elasticearch, an overviewOxalide Workshop #3 - Elasticearch, an overview
Oxalide Workshop #3 - Elasticearch, an overviewLudovic Piot
 
Webinaire 1 de la série Retour aux fondamentaux : Introduction à NoSQL
Webinaire 1 de la série Retour aux fondamentaux : Introduction à NoSQLWebinaire 1 de la série Retour aux fondamentaux : Introduction à NoSQL
Webinaire 1 de la série Retour aux fondamentaux : Introduction à NoSQLMongoDB
 
MongoDB et Elasticsearch, meilleurs ennemis ?
MongoDB et Elasticsearch, meilleurs ennemis ?MongoDB et Elasticsearch, meilleurs ennemis ?
MongoDB et Elasticsearch, meilleurs ennemis ?Sébastien Prunier
 

Mais procurados (20)

Lyon JUG - Elasticsearch
Lyon JUG - ElasticsearchLyon JUG - Elasticsearch
Lyon JUG - Elasticsearch
 
Elasticsearch - OSDC France 2012
Elasticsearch - OSDC France 2012Elasticsearch - OSDC France 2012
Elasticsearch - OSDC France 2012
 
Breizhcamp 2015 - Comment (ne pas réussir à) modéliser ses data dans elastics...
Breizhcamp 2015 - Comment (ne pas réussir à) modéliser ses data dans elastics...Breizhcamp 2015 - Comment (ne pas réussir à) modéliser ses data dans elastics...
Breizhcamp 2015 - Comment (ne pas réussir à) modéliser ses data dans elastics...
 
Présentation de ElasticSearch / Digital apéro du 12/11/2014
Présentation de ElasticSearch / Digital apéro du 12/11/2014Présentation de ElasticSearch / Digital apéro du 12/11/2014
Présentation de ElasticSearch / Digital apéro du 12/11/2014
 
Elasticsearch - Devoxx France 2012
Elasticsearch - Devoxx France 2012Elasticsearch - Devoxx France 2012
Elasticsearch - Devoxx France 2012
 
Migrer une application existante vers Elasticsearch - Nuxeo Tour 2014 - workshop
Migrer une application existante vers Elasticsearch - Nuxeo Tour 2014 - workshopMigrer une application existante vers Elasticsearch - Nuxeo Tour 2014 - workshop
Migrer une application existante vers Elasticsearch - Nuxeo Tour 2014 - workshop
 
Tunis big data_meetup__21_nov2015__aymenzaafouri
Tunis big data_meetup__21_nov2015__aymenzaafouriTunis big data_meetup__21_nov2015__aymenzaafouri
Tunis big data_meetup__21_nov2015__aymenzaafouri
 
Introduction à ElasticSearch
Introduction à ElasticSearchIntroduction à ElasticSearch
Introduction à ElasticSearch
 
[Breizhcamp 2015] MongoDB et Elastic, meilleurs ennemis ?
[Breizhcamp 2015] MongoDB et Elastic, meilleurs ennemis ?[Breizhcamp 2015] MongoDB et Elastic, meilleurs ennemis ?
[Breizhcamp 2015] MongoDB et Elastic, meilleurs ennemis ?
 
Découverte de Elastic search
Découverte de Elastic searchDécouverte de Elastic search
Découverte de Elastic search
 
Elasticsearch
ElasticsearchElasticsearch
Elasticsearch
 
MongoDB : la base NoSQL qui réinvente la gestion de données
MongoDB : la base NoSQL qui réinvente la gestion de donnéesMongoDB : la base NoSQL qui réinvente la gestion de données
MongoDB : la base NoSQL qui réinvente la gestion de données
 
Solr and Elasticsearch in Action (at Breizhcamp)
Solr and Elasticsearch in Action (at Breizhcamp)Solr and Elasticsearch in Action (at Breizhcamp)
Solr and Elasticsearch in Action (at Breizhcamp)
 
Tout ce que le getting started mongo db ne vous dira pas
Tout ce que le getting started mongo db ne vous dira pasTout ce que le getting started mongo db ne vous dira pas
Tout ce que le getting started mongo db ne vous dira pas
 
Atelier : Développement rapide d&rsquo;une application basée surXWiki
Atelier : Développement rapide d&rsquo;une application basée surXWikiAtelier : Développement rapide d&rsquo;une application basée surXWiki
Atelier : Développement rapide d&rsquo;une application basée surXWiki
 
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
 
Jug algeria x wiki-atelier
Jug algeria x wiki-atelierJug algeria x wiki-atelier
Jug algeria x wiki-atelier
 
Oxalide Workshop #3 - Elasticearch, an overview
Oxalide Workshop #3 - Elasticearch, an overviewOxalide Workshop #3 - Elasticearch, an overview
Oxalide Workshop #3 - Elasticearch, an overview
 
Webinaire 1 de la série Retour aux fondamentaux : Introduction à NoSQL
Webinaire 1 de la série Retour aux fondamentaux : Introduction à NoSQLWebinaire 1 de la série Retour aux fondamentaux : Introduction à NoSQL
Webinaire 1 de la série Retour aux fondamentaux : Introduction à NoSQL
 
MongoDB et Elasticsearch, meilleurs ennemis ?
MongoDB et Elasticsearch, meilleurs ennemis ?MongoDB et Elasticsearch, meilleurs ennemis ?
MongoDB et Elasticsearch, meilleurs ennemis ?
 

Semelhante a Paris data geek - Elasticsearch

Construisez votre première application MongoDB
Construisez votre première application MongoDBConstruisez votre première application MongoDB
Construisez votre première application MongoDBMongoDB
 
Devoxx: Tribulation d'un développeur sur le Cloud
Devoxx: Tribulation d'un développeur sur le CloudDevoxx: Tribulation d'un développeur sur le Cloud
Devoxx: Tribulation d'un développeur sur le CloudTugdual Grall
 
Nouveau look pour une nouvelle vie : HTML5, Spring, NoSQL et Mobile
Nouveau look pour une nouvelle vie : HTML5, Spring, NoSQL et MobileNouveau look pour une nouvelle vie : HTML5, Spring, NoSQL et Mobile
Nouveau look pour une nouvelle vie : HTML5, Spring, NoSQL et MobileIppon
 
Nouveau look pour une nouvelle vie : HTML5, Spring, NoSQL et mobilité
Nouveau look pour une nouvelle vie : HTML5, Spring, NoSQL et mobilitéNouveau look pour une nouvelle vie : HTML5, Spring, NoSQL et mobilité
Nouveau look pour une nouvelle vie : HTML5, Spring, NoSQL et mobilitéJulien Dubois
 
Tout ce que le getting started MongoDB ne vous dira pas
Tout ce que le getting started MongoDB ne vous dira pasTout ce que le getting started MongoDB ne vous dira pas
Tout ce que le getting started MongoDB ne vous dira pasBruno Bonnin
 
Nouveau look pour une nouvelle vie, version spéciale Ippon
Nouveau look pour une nouvelle vie, version spéciale IpponNouveau look pour une nouvelle vie, version spéciale Ippon
Nouveau look pour une nouvelle vie, version spéciale IpponJulien Dubois
 
2014 04-09-fr - app dev series - session 4 - indexing
2014 04-09-fr - app dev series - session 4 - indexing2014 04-09-fr - app dev series - session 4 - indexing
2014 04-09-fr - app dev series - session 4 - indexingMongoDB
 
2014 03-26-appdevseries-session3-interactingwiththedatabase-fr-phpapp01
2014 03-26-appdevseries-session3-interactingwiththedatabase-fr-phpapp012014 03-26-appdevseries-session3-interactingwiththedatabase-fr-phpapp01
2014 03-26-appdevseries-session3-interactingwiththedatabase-fr-phpapp01MongoDB
 
HTML5, Spring, NoSQL et mobilité
HTML5, Spring, NoSQL et mobilitéHTML5, Spring, NoSQL et mobilité
HTML5, Spring, NoSQL et mobilitéJulien Dubois
 
Microservices-DDD-Telosys-Devoxx-FR-2022
Microservices-DDD-Telosys-Devoxx-FR-2022Microservices-DDD-Telosys-Devoxx-FR-2022
Microservices-DDD-Telosys-Devoxx-FR-2022Laurent Guérin
 
Oxalide Academy : Workshop #3 Elastic Search
Oxalide Academy : Workshop #3 Elastic SearchOxalide Academy : Workshop #3 Elastic Search
Oxalide Academy : Workshop #3 Elastic SearchOxalide
 
Moteurs de recherche : un oeil sous le capot avec Elastic Search
Moteurs de recherche : un oeil sous le capot avec Elastic SearchMoteurs de recherche : un oeil sous le capot avec Elastic Search
Moteurs de recherche : un oeil sous le capot avec Elastic SearchAudrey Neveu
 
2014 03-26-appdevseries-session3-interactingwiththedatabase-fr-phpapp01-rev.
2014 03-26-appdevseries-session3-interactingwiththedatabase-fr-phpapp01-rev.2014 03-26-appdevseries-session3-interactingwiththedatabase-fr-phpapp01-rev.
2014 03-26-appdevseries-session3-interactingwiththedatabase-fr-phpapp01-rev.MongoDB
 
Enib cours c.a.i. web - séance #1 - html5 css3-js - 2
Enib   cours c.a.i. web - séance #1 - html5 css3-js - 2Enib   cours c.a.i. web - séance #1 - html5 css3-js - 2
Enib cours c.a.i. web - séance #1 - html5 css3-js - 2Horacio Gonzalez
 
Devoxx 2014 : Atelier MongoDB - Decouverte de MongoDB 2.6
Devoxx 2014 : Atelier MongoDB - Decouverte de MongoDB 2.6Devoxx 2014 : Atelier MongoDB - Decouverte de MongoDB 2.6
Devoxx 2014 : Atelier MongoDB - Decouverte de MongoDB 2.6Tugdual Grall
 
Lucene - 10 ans d'usages plus ou moins classiques
Lucene - 10 ans d'usages plus ou moins classiquesLucene - 10 ans d'usages plus ou moins classiques
Lucene - 10 ans d'usages plus ou moins classiquesSylvain Wallez
 
Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une sol...
Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une sol...Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une sol...
Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une sol...Vincent Thavonekham-Pro
 
SQLSaturday Toulouse 2017 - Azure Data Lake : SELECT people FROM data-lake WH...
SQLSaturday Toulouse 2017 - Azure Data Lake : SELECT people FROM data-lake WH...SQLSaturday Toulouse 2017 - Azure Data Lake : SELECT people FROM data-lake WH...
SQLSaturday Toulouse 2017 - Azure Data Lake : SELECT people FROM data-lake WH...Jean-Pierre Riehl
 

Semelhante a Paris data geek - Elasticsearch (20)

Construisez votre première application MongoDB
Construisez votre première application MongoDBConstruisez votre première application MongoDB
Construisez votre première application MongoDB
 
Devoxx: Tribulation d'un développeur sur le Cloud
Devoxx: Tribulation d'un développeur sur le CloudDevoxx: Tribulation d'un développeur sur le Cloud
Devoxx: Tribulation d'un développeur sur le Cloud
 
Nouveau look pour une nouvelle vie : HTML5, Spring, NoSQL et Mobile
Nouveau look pour une nouvelle vie : HTML5, Spring, NoSQL et MobileNouveau look pour une nouvelle vie : HTML5, Spring, NoSQL et Mobile
Nouveau look pour une nouvelle vie : HTML5, Spring, NoSQL et Mobile
 
Nouveau look pour une nouvelle vie : HTML5, Spring, NoSQL et mobilité
Nouveau look pour une nouvelle vie : HTML5, Spring, NoSQL et mobilitéNouveau look pour une nouvelle vie : HTML5, Spring, NoSQL et mobilité
Nouveau look pour une nouvelle vie : HTML5, Spring, NoSQL et mobilité
 
Tout ce que le getting started MongoDB ne vous dira pas
Tout ce que le getting started MongoDB ne vous dira pasTout ce que le getting started MongoDB ne vous dira pas
Tout ce que le getting started MongoDB ne vous dira pas
 
Nouveau look pour une nouvelle vie, version spéciale Ippon
Nouveau look pour une nouvelle vie, version spéciale IpponNouveau look pour une nouvelle vie, version spéciale Ippon
Nouveau look pour une nouvelle vie, version spéciale Ippon
 
2014 04-09-fr - app dev series - session 4 - indexing
2014 04-09-fr - app dev series - session 4 - indexing2014 04-09-fr - app dev series - session 4 - indexing
2014 04-09-fr - app dev series - session 4 - indexing
 
2014 03-26-appdevseries-session3-interactingwiththedatabase-fr-phpapp01
2014 03-26-appdevseries-session3-interactingwiththedatabase-fr-phpapp012014 03-26-appdevseries-session3-interactingwiththedatabase-fr-phpapp01
2014 03-26-appdevseries-session3-interactingwiththedatabase-fr-phpapp01
 
HTML5, Spring, NoSQL et mobilité
HTML5, Spring, NoSQL et mobilitéHTML5, Spring, NoSQL et mobilité
HTML5, Spring, NoSQL et mobilité
 
Microservices-DDD-Telosys-Devoxx-FR-2022
Microservices-DDD-Telosys-Devoxx-FR-2022Microservices-DDD-Telosys-Devoxx-FR-2022
Microservices-DDD-Telosys-Devoxx-FR-2022
 
Oxalide Academy : Workshop #3 Elastic Search
Oxalide Academy : Workshop #3 Elastic SearchOxalide Academy : Workshop #3 Elastic Search
Oxalide Academy : Workshop #3 Elastic Search
 
Moteurs de recherche : un oeil sous le capot avec Elastic Search
Moteurs de recherche : un oeil sous le capot avec Elastic SearchMoteurs de recherche : un oeil sous le capot avec Elastic Search
Moteurs de recherche : un oeil sous le capot avec Elastic Search
 
2014 03-26-appdevseries-session3-interactingwiththedatabase-fr-phpapp01-rev.
2014 03-26-appdevseries-session3-interactingwiththedatabase-fr-phpapp01-rev.2014 03-26-appdevseries-session3-interactingwiththedatabase-fr-phpapp01-rev.
2014 03-26-appdevseries-session3-interactingwiththedatabase-fr-phpapp01-rev.
 
Enib cours c.a.i. web - séance #1 - html5 css3-js - 2
Enib   cours c.a.i. web - séance #1 - html5 css3-js - 2Enib   cours c.a.i. web - séance #1 - html5 css3-js - 2
Enib cours c.a.i. web - séance #1 - html5 css3-js - 2
 
NodeJs in real life
NodeJs in real lifeNodeJs in real life
NodeJs in real life
 
Devoxx 2014 : Atelier MongoDB - Decouverte de MongoDB 2.6
Devoxx 2014 : Atelier MongoDB - Decouverte de MongoDB 2.6Devoxx 2014 : Atelier MongoDB - Decouverte de MongoDB 2.6
Devoxx 2014 : Atelier MongoDB - Decouverte de MongoDB 2.6
 
Introduction à node.js
Introduction à node.js Introduction à node.js
Introduction à node.js
 
Lucene - 10 ans d'usages plus ou moins classiques
Lucene - 10 ans d'usages plus ou moins classiquesLucene - 10 ans d'usages plus ou moins classiques
Lucene - 10 ans d'usages plus ou moins classiques
 
Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une sol...
Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une sol...Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une sol...
Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une sol...
 
SQLSaturday Toulouse 2017 - Azure Data Lake : SELECT people FROM data-lake WH...
SQLSaturday Toulouse 2017 - Azure Data Lake : SELECT people FROM data-lake WH...SQLSaturday Toulouse 2017 - Azure Data Lake : SELECT people FROM data-lake WH...
SQLSaturday Toulouse 2017 - Azure Data Lake : SELECT people FROM data-lake WH...
 

Mais de David Pilato

2018-10-02 - Un moteur de recherche NoSQL pour chercher^H^H^H^H^H^H^H^H trouv...
2018-10-02 - Un moteur de recherche NoSQL pour chercher^H^H^H^H^H^H^H^H trouv...2018-10-02 - Un moteur de recherche NoSQL pour chercher^H^H^H^H^H^H^H^H trouv...
2018-10-02 - Un moteur de recherche NoSQL pour chercher^H^H^H^H^H^H^H^H trouv...David Pilato
 
Managing your black friday logs Voxxed Luxembourg
Managing your black friday logs Voxxed LuxembourgManaging your black friday logs Voxxed Luxembourg
Managing your black friday logs Voxxed LuxembourgDavid Pilato
 
Un moteur de recherche NoSQL pour chercher^H^H^H^H^H^H^H^H trouver...
Un moteur de recherche NoSQL pour chercher^H^H^H^H^H^H^H^H trouver...Un moteur de recherche NoSQL pour chercher^H^H^H^H^H^H^H^H trouver...
Un moteur de recherche NoSQL pour chercher^H^H^H^H^H^H^H^H trouver...David Pilato
 
Managing your Black Friday Logs NDC Oslo
Managing your  Black Friday Logs NDC OsloManaging your  Black Friday Logs NDC Oslo
Managing your Black Friday Logs NDC OsloDavid Pilato
 
Managing your black friday logs - Code Europe
Managing your black friday logs - Code EuropeManaging your black friday logs - Code Europe
Managing your black friday logs - Code EuropeDavid Pilato
 
Managing your black Friday logs - CloudConf.IT
Managing your black Friday logs - CloudConf.ITManaging your black Friday logs - CloudConf.IT
Managing your black Friday logs - CloudConf.ITDavid Pilato
 
Elasticsearch in 15 minutes
Elasticsearch in 15 minutesElasticsearch in 15 minutes
Elasticsearch in 15 minutesDavid Pilato
 
Elastify you application: from SQL to NoSQL in less than one hour!
Elastify you application: from SQL to NoSQL in less than one hour!Elastify you application: from SQL to NoSQL in less than one hour!
Elastify you application: from SQL to NoSQL in less than one hour!David Pilato
 
Elasticsearch - Devoxx France 2012 - English version
Elasticsearch - Devoxx France 2012 - English versionElasticsearch - Devoxx France 2012 - English version
Elasticsearch - Devoxx France 2012 - English versionDavid Pilato
 

Mais de David Pilato (9)

2018-10-02 - Un moteur de recherche NoSQL pour chercher^H^H^H^H^H^H^H^H trouv...
2018-10-02 - Un moteur de recherche NoSQL pour chercher^H^H^H^H^H^H^H^H trouv...2018-10-02 - Un moteur de recherche NoSQL pour chercher^H^H^H^H^H^H^H^H trouv...
2018-10-02 - Un moteur de recherche NoSQL pour chercher^H^H^H^H^H^H^H^H trouv...
 
Managing your black friday logs Voxxed Luxembourg
Managing your black friday logs Voxxed LuxembourgManaging your black friday logs Voxxed Luxembourg
Managing your black friday logs Voxxed Luxembourg
 
Un moteur de recherche NoSQL pour chercher^H^H^H^H^H^H^H^H trouver...
Un moteur de recherche NoSQL pour chercher^H^H^H^H^H^H^H^H trouver...Un moteur de recherche NoSQL pour chercher^H^H^H^H^H^H^H^H trouver...
Un moteur de recherche NoSQL pour chercher^H^H^H^H^H^H^H^H trouver...
 
Managing your Black Friday Logs NDC Oslo
Managing your  Black Friday Logs NDC OsloManaging your  Black Friday Logs NDC Oslo
Managing your Black Friday Logs NDC Oslo
 
Managing your black friday logs - Code Europe
Managing your black friday logs - Code EuropeManaging your black friday logs - Code Europe
Managing your black friday logs - Code Europe
 
Managing your black Friday logs - CloudConf.IT
Managing your black Friday logs - CloudConf.ITManaging your black Friday logs - CloudConf.IT
Managing your black Friday logs - CloudConf.IT
 
Elasticsearch in 15 minutes
Elasticsearch in 15 minutesElasticsearch in 15 minutes
Elasticsearch in 15 minutes
 
Elastify you application: from SQL to NoSQL in less than one hour!
Elastify you application: from SQL to NoSQL in less than one hour!Elastify you application: from SQL to NoSQL in less than one hour!
Elastify you application: from SQL to NoSQL in less than one hour!
 
Elasticsearch - Devoxx France 2012 - English version
Elasticsearch - Devoxx France 2012 - English versionElasticsearch - Devoxx France 2012 - English version
Elasticsearch - Devoxx France 2012 - English version
 

Paris data geek - Elasticsearch

  • 1. Paris Data Geek Fév 2013 Elasticsearch. Le moteur de recherche élastique pour tous David Pilato, Elasticsearch.com, Paris lundi 11 février 13
  • 2. Qui ? $ curl http://localhost:9200/talk/speaker/dpilato { "nom" : "David Pilato", "jobs" : [ { "boite" : "SRA Europe (SSII)", "mission" : "bon à tout faire", "date" : "1995" }, { "boite" : "SFR", "mission" : "touche à tout", "date" : "1997" }, { "boite" : "e-Brands / Vivendi", "mission" : "chef de projets", "date": "2000" }, { "boite" : "DGDDI (douane)", "mission" : "mouton à 5 pattes", "date" : "2005" }, { "boite" : "IDEO Technologies", "mission" : "directeur technique", "date" : "2012" }, { "boite" : "Elasticsearch.com", "mission" : "technical advocate", "date" : "2013" } ], "passions" : [ "famille", "job", "deejay" ], "blog" : "http://dev.david.pilato.fr/", "twitter" : [ "@dadoonet", "@elasticsearchfr", "@scrutmydocs" ], "email" : "david@pilato.fr" } lundi 11 février 13
  • 3. Qui ? $ curl http://localhost:9200/talk/speaker/dpilato { "nom" : "David Pilato", "jobs" : [ { "boite" : "SRA Europe (SSII)", "mission" : "bon à tout faire", "date" : "1995" }, { "boite" : "SFR", "mission" : "touche à tout", "date" : "1997" }, { "boite" : "e-Brands / Vivendi", "mission" : "chef de projets", "date": "2000" }, { "boite" : "DGDDI (douane)", "mission" : "mouton à 5 pattes", "date" : "2005" }, { "boite" : "IDEO Technologies", "mission" : "directeur technique", "date" : "2012" }, { "boite" : "Elasticsearch.com", "mission" : "technical advocate", "date" : "2013" } ], "passions" : [ "famille", "job", "deejay" ], "blog" : "http://dev.david.pilato.fr/", "twitter" : [ "@dadoonet", "@elasticsearchfr", "@scrutmydocs" ], "email" : "david@pilato.fr" } lundi 11 février 13
  • 5. SQL Classique Cherche moi un document de décembre 2011 portant sur la france et contenant produit et david En SQL : lundi 11 février 13
  • 6. SQL Classique Cherche moi un document de décembre 2011 portant sur la france et contenant produit et david En SQL : SELECT doc.*, pays.* FROM doc, pays WHERE doc.pays_code = pays.code AND doc.date_doc > to_date('2011-12', 'yyyy-mm') AND doc.date_doc < to_date('2012-01', 'yyyy-mm') AND lower(pays.libelle) = 'france' AND lower(doc.commentaire) LIKE ‘%produit%' AND lower(doc.commentaire) LIKE ‘%david%'; lundi 11 février 13
  • 7. Au final, on obtient lundi 11 février 13
  • 8. Un moteur de recherche • Un moteur de recherche est composé de : • un moteur d’indexation de documents • un moteur de recherche sur les index • De fait, un moteur de recherche est énormément plus rapide qu’une base de données pour faire des recherches : c’est son métier ! lundi 11 février 13
  • 9. L’indexation, c’est quoi en fait ? lundi 11 février 13
  • 11. Elasticsearch Your Data, your Search ! lundi 11 février 13
  • 12. Elasticsearch • Moteur de recherche pour la génération NoSQL • Basé sur le standard Apache Lucene • Masque la complexité Java/Lucene à l’aide de services standards HTTP / RESTful / JSON • Utilisable à partir de n’importe quelle technologie • Ajoute la couche cloud manquante à Lucene • C’est un moteur, pas une interface graphique ! lundi 11 février 13
  • 13. Indexer $ curl -XPUT localhost:9200/twitter/tweet/1 -d ' { "text": "Bienvenue à la conférence #elasticsearch pour #JUG", "created_at": "2012-04-06T20:45:36.000Z", "source": "Twitter for iPad", "truncated": false, "retweet_count": 0, "hashtag": [ { "text": "elasticsearch", "start": 27, "end": 40 }, { "text": "JUG", "start": 47, "end": 55 } ], "user": { "id": 51172224, "name": "David Pilato", "screen_name": "dadoonet", "location": "France", "description": "Soft Architect, Project Manager, Senior Developper.r nAt this time, enjoying NoSQL world : CouchDB, ElasticSearch.rnDeeJay 4 times a year, just for fun !" } }' lundi 11 février 13
  • 14. Indexer $ curl -XPUT localhost:9200/twitter/tweet/1 -d ' { "text": "Bienvenue à la conférence #elasticsearch pour #JUG", "created_at": "2012-04-06T20:45:36.000Z", "source": "Twitter for iPad", "truncated": false, "retweet_count": 0, "hashtag": [ { "text": "elasticsearch", "start": 27, "end": 40 }, { "text": "JUG", "start": 47, "end": 55 } ], "user": { "id": 51172224, "name": "David Pilato", "screen_name": "dadoonet", "location": "France", "description": "Soft Architect, Project Manager, Senior Developper.r nAt this time, enjoying NoSQL world : CouchDB, ElasticSearch.rnDeeJay 4 times a year, just for fun !" } }' { "ok":true, "_index":"twitter", "_type":"tweet", "_id":"1" } lundi 11 février 13
  • 15. Chercher $ curl localhost:9200/twitter/tweet/_search?q=elasticsearch lundi 11 février 13
  • 16. Chercher $ curl localhost:9200/twitter/tweet/_search?q=elasticsearch { "took" : 24, "timed_out" : false, "_shards" : { "total" : 5, "successful" : 5, "failed" : 0 }, "hits" : { "total" : 1, "max_score" : 0.227, "hits" : [ { "_index" : "twitter", "_type" : "tweet", "_id" : "1", "_score" : 0.227, "_source" : { "text": "Bienvenue à la conférence #elasticsearch pour #JUG", "created_at": "2012-04-06T20:45:36.000Z", "source": "Twitter for iPad", […] } } ] } } lundi 11 février 13
  • 17. Chercher $ curl localhost:9200/twitter/tweet/_search?q=elasticsearch { "took" : 24, Nb de "timed_out" : false, documents "_shards" : { "total" : 5, "successful" : 5, "failed" : 0 }, "hits" : { "total" : 1, "max_score" : 0.227, "hits" : [ { "_index" : "twitter", "_type" : "tweet", "_id" : "1", "_score" : 0.227, "_source" : { "text": "Bienvenue à la conférence #elasticsearch pour #JUG", "created_at": "2012-04-06T20:45:36.000Z", "source": "Twitter for iPad", […] } } ] } } lundi 11 février 13
  • 18. Chercher $ curl localhost:9200/twitter/tweet/_search?q=elasticsearch { "took" : 24, "timed_out" : false, "_shards" : { "total" : 5, "successful" : 5, "failed" : 0 }, "hits" : { "total" : 1, "max_score" : 0.227, "hits" : [ { Coordonnées "_index" : "twitter", "_type" : "tweet", "_id" : "1", "_score" : 0.227, "_source" : { "text": "Bienvenue à la conférence #elasticsearch pour #JUG", "created_at": "2012-04-06T20:45:36.000Z", "source": "Twitter for iPad", […] } } ] } } lundi 11 février 13
  • 19. Chercher $ curl localhost:9200/twitter/tweet/_search?q=elasticsearch { "took" : 24, "timed_out" : false, "_shards" : { "total" : 5, "successful" : 5, "failed" : 0 }, "hits" : { "total" : 1, "max_score" : 0.227, "hits" : [ { "_index" : "twitter", "_type" : "tweet", "_id" : "1", "_score" : 0.227, "_source" : { "text": "Bienvenue à la conférence #elasticsearch pour #JUG", "created_at": "2012-04-06T20:45:36.000Z", "source": "Twitter for iPad", […] } Pertinence } ] } } lundi 11 février 13
  • 20. Chercher $ curl localhost:9200/twitter/tweet/_search?q=elasticsearch { "took" : 24, "timed_out" : false, "_shards" : { "total" : 5, "successful" : 5, "failed" : 0 }, "hits" : { "total" : 1, Document "max_score" : 0.227, "hits" : [ { source "_index" : "twitter", "_type" : "tweet", "_id" : "1", "_score" : 0.227, "_source" : { "text": "Bienvenue à la conférence #elasticsearch pour #JUG", "created_at": "2012-04-06T20:45:36.000Z", "source": "Twitter for iPad", […] } } ] } } lundi 11 février 13
  • 21. Query DSL • Requêtes précises : plutôt que de chercher « à la google », on peut utiliser des critères précis : lundi 11 février 13
  • 22. Query DSL • Requêtes précises : plutôt que de chercher « à la google », on peut utiliser des critères précis : $ curl -XPOST localhost:9200/twitter/tweet/_search -d ’{ "bool" : { "must" : { "term" : { "user" : "kimchy" } }, "must_not" : { "range" : { "age" : { "from" : 10, "to" : 20 } } }, "should" : [ { "term" : { "tag" : "wow" } },{ "match" : { "tag" : "elasticsearch is cool" } } ] } }’ lundi 11 février 13
  • 23. Analyser La puissance des facettes ! Faites parler vos données en les regardant sous différentes facettes ! (Et en temps quasi réel, s’il vous plait !) lundi 11 février 13
  • 24. Des tweets ID Username Date Hashtag 1 dadoonet 2012-04-18 1 2 talk 2012-04-18 5 3 elasticsearch 2012-04-18 2 4 dadoonet 2012-04-18 2 5 talk 2012-04-18 6 6 elasticsearch 2012-04-19 3 7 dadoonet 2012-04-19 3 8 talk 2012-04-19 7 9 elasticsearch 2012-04-20 4 lundi 11 février 13
  • 25. Term Facet D Username Date Hashtag 1 dadoonet 2012-04-18 1 2 talktalk 2012-04-18 5 3 elasticsearch 2012-04-18 2 4 dadoonet 2012-04-18 2 5 talk 2012-04-18 6 6 elasticsearch 2012-04-19 3 7 dadoonet 2012-04-19 3 8 talk 2012-04-19 7 9 elasticsearch 2012-04-20 4 lundi 11 février 13
  • 26. Term Facet D Username Date Hashtag 1 dadoonet 2012-04-18 1 2 talktalk 2012-04-18 5 3 elasticsearch 2012-04-18Username 2 Count 4 dadoonet 2012-04-18dadoonet 2 3 5 talk 2012-04-18 talk 6 3 6 elasticsearch 2012-04-19 elasticsearch 3 3 7 dadoonet 2012-04-19 3 8 talk 2012-04-19 7 9 elasticsearch 2012-04-20 4 lundi 11 février 13
  • 27. Term Facet D Username Date Hashtag 1 dadoonet 2012-04-18 1 2 talk 2012-04-18 5 3 elasticsearch 2012-04-18 2 4 dadoonet 2012-04-18 2 5 talk 2012-04-18 6 6 elasticsearch 2012-04-19 3 7 dadoonet 2012-04-19 3 8 talk 2012-04-19 7 9 elasticsearch 2012-04-20 4 lundi 11 février 13
  • 28. Term Facet D Username Date Hashtag 1 dadoonet 2012-04-18 "facets" : { 1 "users" : { "terms" : {"field" : "username"} } } 2 talk 2012-04-18 5 3 elasticsearch 2012-04-18 2 4 dadoonet 2012-04-18 2 5 talk 2012-04-18 6 6 elasticsearch 2012-04-19 3 7 dadoonet 2012-04-19 3 8 talk 2012-04-19 7 9 elasticsearch 2012-04-20 4 lundi 11 février 13
  • 29. Term Facet D Username Date Hashtag 1 dadoonet 2012-04-18 "facets" : { 1 "users" : { "terms" : {"field" : "username"} } } 2 talk 2012-04-18 5 "facets" : { 3 elasticsearch 2012-04-18 "users" : { 2 "_type" : "terms", 4 dadoonet 2012-04-18"missing" : 0,2 "total": 9, 5 talk 2012-04-18"other": 0, 6 "terms" : [ 6 elasticsearch 2012-04-19 { "term" : "dadoonet", "count" },3 }, 3 { "term" : "talk", "count" : 3 : { "term" : "elasticsearch", "count" : 3 } 7 dadoonet 2012-04-19] 3 } 8 talk 2012-04-19 } 7 9 elasticsearch 2012-04-20 4 lundi 11 février 13
  • 30. Date Histogram Facet Date Hashtag 2012-04-18 1 2012-04-18 5 h 2012-04-18 2 2012-04-18 2 2012-04-18 6 h 2012-04-19 3 2012-04-19 3 2012-04-19 7 h 2012-04-20 4 lundi 11 février 13
  • 31. Date Histogram Facet Date Hashtag 2012-04-18 1 Par mois 2012-04-18 5 Date Count h 2012-04-18 2 2012-04 9 2012-04-18 2 2012-04-18 6 h 2012-04-19 3 2012-04-19 3 2012-04-19 7 h 2012-04-20 4 lundi 11 février 13
  • 32. Date Histogram Facet Date Hashtag 2012-04-18 1 Par mois 2012-04-18 5 Date Count h 2012-04-18 2 2012-04 9 2012-04-18 2 2012-04-18 6 Par jour h 2012-04-19 3 Date Count 2012-04-19 3 2012-04-18 5 2012-04-19 7 2012-04-19 3 h 2012-04-20 4 2012-04-20 1 lundi 11 février 13
  • 33. Date Histogram Facet Date Hashtag 2012-04-18 1 2012-04-18 5 h 2012-04-18 2 2012-04-18 2 2012-04-18 6 h 2012-04-19 3 2012-04-19 3 2012-04-19 7 h 2012-04-20 4 lundi 11 février 13
  • 34. Date Histogram Facet Date Hashtag "facets" : { 2012-04-18 1 "perday" : { "date_histogram" : { 2012-04-18 5 "field" : "date", "interval" : "day" } h 2012-04-18 2 } } 2012-04-18 2 2012-04-18 6 h 2012-04-19 3 2012-04-19 3 2012-04-19 7 h 2012-04-20 4 lundi 11 février 13
  • 35. Date Histogram Facet Date Hashtag "facets" : { 2012-04-18 1 "perday" : { "date_histogram" : { 2012-04-18 5 "field" : "date", "interval" : "day" } h 2012-04-18 2 } } 2012-04-18 2 "facets" : { 2012-04-18 6 "perday" : { "_type" : "date_histogram", h 2012-04-19 3 "entries": [ { "time": 1334700000000, "count": 5 }, 2012-04-19 3 { "time": 1334786400000, "count": 3 }, { "time": 1334872800000, "count": 1 } 2012-04-19 7 } ] } h 2012-04-20 4 lundi 11 février 13
  • 36. Range Facet Hashtag 1 5 2 2 6 3 3 7 4 lundi 11 février 13
  • 37. Range Facet Hashtag 1 5 2 Hashtag Count Min Max Moy Total 2 x<3 3 1 2 1.667 5 6 3 <= x < 5 3 3 4 3.333 10 3 x >= 5 3 5 7 6 18 3 7 4 lundi 11 février 13
  • 38. Range Facet Hashtag 1 5 2 2 6 3 3 7 4 lundi 11 février 13
  • 39. Range Facet "facets" : { "hashtags" : { "range" : { "field" : "hashtag", "ranges" : [ { "to" : 3 }, Hashtag { "from" : 3, "to" : 5 }, { "from" : 5 } ] } } } 1 5 2 2 6 3 3 7 4 lundi 11 février 13
  • 40. Range Facet "facets" : { "hashtags" : { "range" : { "field" : "hashtag", "ranges" : [ { "to" : 3 }, Hashtag { "from" : 3, "to" : 5 }, { "from" : 5 } ] } } } 1 "facets" : { 5 "hashtags" : { "_type" : "range", 2 "ranges" : [ { "to": 3, 2 "count": 3, "min": 1, "max": 2, 6 "total": 5, "mean": 1.667 }, { "from":3, "to" : 5, 3 "count": 3, "min": 3, "max": 4, 3 "total": 10, "mean": 3.333 },{ 7 "from":5, "count": 3, 4 "min": 5, "max": 7, "total": 18, "mean": 6 } ] } } lundi 11 février 13
  • 41. Site marchand lundi 11 février 13
  • 42. Site marchand lundi 11 février 13
  • 43. Site marchand lundi 11 février 13
  • 44. Site marchand lundi 11 février 13
  • 45. Site marchand Ranges Term Term Ranges lundi 11 février 13
  • 46. Analyse temps-réel • Faire un matchAll sur l'ensemble des données • Actualiser toutes les x secondes • Indexer en même temps les nouvelles données Date histogram Term lundi 11 février 13
  • 47. Facettes Cartographiques lundi 11 février 13
  • 48. Reprenons notre formulaire lundi 11 février 13
  • 49. Reprenons notre formulaire Recherche Full Text lundi 11 février 13
  • 50. Reprenons notre formulaire lundi 11 février 13
  • 51. Reprenons notre formulaire lundi 11 février 13
  • 52. Démonstration http://onemilliontweetmap.com/ http://www.francetvinfo.fr/en-direct/ http://localhost:9200/_plugin/demo/ lundi 11 février 13
  • 53. Architecture Un peu plus de technique : partitions / réplications / scalabilité lundi 11 février 13
  • 55. Lexique • Nœud (node) : Une instance d'Elasticsearch (~ machine ?) lundi 11 février 13
  • 56. Lexique • Nœud (node) : Une instance d'Elasticsearch (~ machine ?) • Cluster : Un ensemble de nœuds lundi 11 février 13
  • 57. Lexique • Nœud (node) : Une instance d'Elasticsearch (~ machine ?) • Cluster : Un ensemble de nœuds • Partition (shard) : permet de découper un index en plusieurs parties pour y distribuer les documents lundi 11 février 13
  • 58. Lexique • Nœud (node) : Une instance d'Elasticsearch (~ machine ?) • Cluster : Un ensemble de nœuds • Partition (shard) : permet de découper un index en plusieurs parties pour y distribuer les documents • Réplication (replica) : recopie d’une partition en une ou plusieurs copies dans l'ensemble du cluster lundi 11 février 13
  • 59. Créons un index Cluster Nœud 1 Client CURL lundi 11 février 13
  • 60. Créons un index $ curl -XPUT localhost:9200/twitter -d '{ Cluster "index" : { Nœud 1 "number_of_shards" : 2, "number_of_replicas" : 1 Shard 0 } Shard 1 }' réplication non respectée Client CURL lundi 11 février 13
  • 61. Créons un index $ curl -XPUT localhost:9200/twitter -d '{ Cluster "index" : { Nœud 1 Nœud 2 "number_of_shards" : 2, "number_of_replicas" : 1 Shard 0 Shard 0 } }' Shard 1 Shard 1 réplication respectée Client CURL lundi 11 février 13
  • 62. Réallocation dynamique Cluster Nœud 1 Nœud 2 Shard 0 Shard 0 Shard 1 Shard 1 lundi 11 février 13
  • 63. Réallocation dynamique Cluster Nœud 1 Nœud 2 Nœud 3 Shard 0 Shard 0 Shard 1 Shard 1 lundi 11 février 13
  • 64. Réallocation dynamique Cluster Nœud 1 Nœud 2 Nœud 3 Shard 0 Shard 0 Shard 0 Shard 1 Shard 1 lundi 11 février 13
  • 65. Réallocation dynamique Cluster Nœud 1 Nœud 2 Nœud 3 Shard 0 Shard 0 Shard 1 Shard 1 lundi 11 février 13
  • 66. Réallocation dynamique Cluster Nœud 1 Nœud 2 Nœud 3 Shard 0 Shard 0 Shard 1 Shard 1 lundi 11 février 13
  • 67. Réallocation dynamique Cluster Nœud 1 Nœud 2 Nœud 3 Nœud 4 Shard 0 Shard 0 Shard 1 Shard 1 lundi 11 février 13
  • 68. Réallocation dynamique Cluster Nœud 1 Nœud 2 Nœud 3 Nœud 4 Shard 0 Shard 0 Shard 1 Shard 1 Shard 1 lundi 11 février 13
  • 69. Réallocation dynamique Cluster Nœud 1 Nœud 2 Nœud 3 Nœud 4 Shard 0 Shard 0 Shard 1 Shard 1 Le tuning, c'est trouver le bon équilibre entre le nombre de nodes, shards et replicas ! lundi 11 février 13
  • 70. Indexons un document Cluster Nœud 1 Nœud 2 Nœud 3 Nœud 4 Shard 0 Shard 0 Shard 1 Shard 1 Doc 1 Client $ curl -XPUT localhost:9200/twitter/tweet/1 -d ' CURL { "text": "Bienvenue à la conférence #elasticsearch pour #JUG", "created_at": "2012-04-06T20:45:36.000Z", "source": "Twitter for iPad", ... }' lundi 11 février 13
  • 71. Indexons un document Cluster Nœud 1 Nœud 2 Nœud 3 Nœud 4 Doc Shard 0 1 Shard 0 Shard 1 Shard 1 Client $ curl -XPUT localhost:9200/twitter/tweet/1 -d ' CURL { "text": "Bienvenue à la conférence #elasticsearch pour #JUG", "created_at": "2012-04-06T20:45:36.000Z", "source": "Twitter for iPad", ... }' lundi 11 février 13
  • 72. Indexons un document Cluster Nœud 1 Nœud 2 Nœud 3 Nœud 4 Doc Shard 0 1 Shard 0 Shard 1 Shard 1 Client $ curl -XPUT localhost:9200/twitter/tweet/1 -d ' CURL { "text": "Bienvenue à la conférence #elasticsearch pour #JUG", "created_at": "2012-04-06T20:45:36.000Z", "source": "Twitter for iPad", ... }' lundi 11 février 13
  • 73. Indexons un document Cluster Nœud 1 Nœud 2 Nœud 3 Nœud 4 Doc Doc Shard 0 1 Shard 0 1 Shard 1 Shard 1 Client $ curl -XPUT localhost:9200/twitter/tweet/1 -d ' CURL { "text": "Bienvenue à la conférence #elasticsearch pour #JUG", "created_at": "2012-04-06T20:45:36.000Z", "source": "Twitter for iPad", ... }' lundi 11 février 13
  • 74. Indexons un 2ème document Cluster Nœud 1 Nœud 2 Nœud 3 Nœud 4 Doc Doc Shard 0 1 Shard 0 1 Shard 1 Shard 1 Doc 2 Client $ curl -XPUT localhost:9200/twitter/tweet/2 -d ' CURL { "text": "Je fais du bruit pour #elasticsearch à #JUG", "created_at": "2012-04-06T21:12:52.000Z", "source": "Twitter for iPad", ... }' lundi 11 février 13
  • 75. Indexons un 2ème document Cluster Nœud 1 Nœud 2 Nœud 3 Nœud 4 Doc Doc Shard 0 1 Shard 0 1 Shard 1 Shard 1 Doc 2 Client $ curl -XPUT localhost:9200/twitter/tweet/2 -d ' CURL { "text": "Je fais du bruit pour #elasticsearch à #JUG", "created_at": "2012-04-06T21:12:52.000Z", "source": "Twitter for iPad", ... }' lundi 11 février 13
  • 76. Indexons un 2ème document Cluster Nœud 1 Nœud 2 Nœud 3 Nœud 4 Doc Doc Shard 0 1 Shard 0 1 Shard 1 Doc Shard 1 2 Client $ curl -XPUT localhost:9200/twitter/tweet/2 -d ' CURL { "text": "Je fais du bruit pour #elasticsearch à #JUG", "created_at": "2012-04-06T21:12:52.000Z", "source": "Twitter for iPad", ... }' lundi 11 février 13
  • 77. Indexons un 2ème document Cluster Nœud 1 Nœud 2 Nœud 3 Nœud 4 Doc Doc Shard 0 1 Shard 0 1 Shard 1 Doc Shard 1 2 Client $ curl -XPUT localhost:9200/twitter/tweet/2 -d ' CURL { "text": "Je fais du bruit pour #elasticsearch à #JUG", "created_at": "2012-04-06T21:12:52.000Z", "source": "Twitter for iPad", ... }' lundi 11 février 13
  • 78. Indexons un 2ème document Cluster Nœud 1 Nœud 2 Nœud 3 Nœud 4 Doc Doc Shard 0 1 Shard 0 1 Doc Doc Shard 1 Shard 1 2 2 Client $ curl -XPUT localhost:9200/twitter/tweet/2 -d ' CURL { "text": "Je fais du bruit pour #elasticsearch à #JUG", "created_at": "2012-04-06T21:12:52.000Z", "source": "Twitter for iPad", ... }' lundi 11 février 13
  • 79. Cherchons ! Cluster Nœud 1 Nœud 2 Nœud 3 Nœud 4 Doc Doc Shard 0 1 Shard 0 1 Doc Doc Shard 1 Shard 1 2 2 Client $ curl localhost:9200/twitter/_search?q=elasticsearch CURL lundi 11 février 13
  • 80. Cherchons ! Cluster Nœud 1 Nœud 2 Nœud 3 Nœud 4 Doc Doc Shard 0 1 Shard 0 1 Doc Doc Shard 1 Shard 1 2 2 Client $ curl localhost:9200/twitter/_search?q=elasticsearch CURL lundi 11 février 13
  • 81. Cherchons ! Cluster Nœud 1 Nœud 2 Nœud 3 Nœud 4 Doc Shard 0 Shard 0 1 Doc Shard 1 Shard 1 Doc 2 Doc 1 2 Client $ curl localhost:9200/twitter/_search?q=elasticsearch CURL lundi 11 février 13
  • 82. Cherchons ! Cluster Nœud 1 Nœud 2 Nœud 3 Nœud 4 Doc Shard 0 Shard 0 1 Doc Shard 1 Shard 1 2 Doc Doc 2 1 Client $ curl localhost:9200/twitter/_search?q=elasticsearch CURL lundi 11 février 13
  • 83. Cherchons ! { Cluster "took" : 24, Nœud 1 "timed_out" : false,Nœud 3 Nœud 2 Nœud 4 "_shards" : { "total" : 5, "successful" : 5, "failed" : 0 }, Doc Shard 0 "hits" : { Shard 0 1 "total" : 2, "max_score" : 0.227, Doc Shard 1 "hits" : [ { Shard 1 2 "_index" : "twitter", "_type" : "tweet", "_id" : "1", "_score" : 0.227, "_source" : { ... } Doc }, { Doc 2 "_index" : "twitter", 1 Client "_type" : "tweet", $ curl localhost:9200/twitter/_search?q=elasticsearch CURL "_id" : "2", "_score" : 0.152, "_source" : { ... } } ] } lundi 11 février 13
  • 84. Cherchons encore ! Cluster Nœud 1 Nœud 2 Nœud 3 Nœud 4 Doc Doc Shard 0 1 Shard 0 1 Doc Doc Shard 1 Shard 1 2 2 Client $ curl localhost:9200/twitter/_search?q=elasticsearch CURL lundi 11 février 13
  • 85. Cherchons encore ! Cluster Nœud 1 Nœud 2 Nœud 3 Nœud 4 Doc Doc Shard 0 1 Shard 0 1 Doc Doc Shard 1 Shard 1 2 2 Client $ curl localhost:9200/twitter/_search?q=elasticsearch CURL lundi 11 février 13
  • 86. Cherchons encore ! Cluster Nœud 1 Nœud 2 Nœud 3 Nœud 4 Doc Shard 0 1 Shard 0 Doc 1 Shard 1 Doc Doc Shard 1 2 2 Client $ curl localhost:9200/twitter/_search?q=elasticsearch CURL lundi 11 février 13
  • 87. Cherchons encore ! Cluster Nœud 1 Nœud 2 Nœud 3 Doc Shard 0 1 Shard 0 Doc 1 Shard 1 Doc 2 Client $ curl localhost:9200/twitter/_search?q=elasticsearch CURL lundi 11 février 13
  • 88. Cherchons encore ! Cluster Nœud 1 Nœud 2 Nœud 3 Doc Shard 0 1 Shard 0 Doc 1 Shard 1 Doc 2 Client $ curl localhost:9200/twitter/_search?q=elasticsearch CURL lundi 11 février 13
  • 89. Cherchons encore ! Cluster Nœud 1 Nœud 2 Nœud 3 Doc Shard 0 1 Shard 0 Shard 1 Doc Doc 1 2 Client $ curl localhost:9200/twitter/_search?q=elasticsearch CURL lundi 11 février 13
  • 90. Cherchons encore ! Cluster Nœud 1 Nœud 2 Nœud 3 Doc Shard 0 1 Shard 0 Shard 1 Doc Doc 2 1 Client $ curl localhost:9200/twitter/_search?q=elasticsearch CURL lundi 11 février 13
  • 91. Cherchons encore ! { Cluster "took" : 24, Nœud 1 "timed_out" : false,Nœud 3 Nœud 2 "_shards" : { "total" : 5, "successful" : 5, "failed" : 0 }, Doc Shard 0 1 "hits" : { Shard 0 "total" : 2, "max_score" : 0.227, Shard 1 "hits" : [ { "_index" : "twitter", "_type" : "tweet", "_id" : "1", "_score" : 0.227, "_source" : { ... } Doc }, { 2 Doc "_index" : "twitter", 1 Client "_type" : "tweet", $ curl localhost:9200/twitter/_search?q=elasticsearch CURL "_id" : "2", "_score" : 0.152, "_source" : { ... } } ] } lundi 11 février 13
  • 92. La communauté ~100 contributeurs directs au projet (+ de 3200 watchers et + de 620 forks) lundi 11 février 13
  • 93. La communauté ~100 contributeurs directs au projet (+ de 3200 watchers et + de 620 forks) lundi 11 février 13
  • 94. La communauté ~170 inscrits sur la mailing list, 70 messages / mois, ~270 followers lundi 11 février 13
  • 96. Rejoignez le mouvement ! @ElasticsearchFR www.elasticsearch.fr ss re og pr in Questions ? Posez aussi vos questions sur elasticsearch-fr@googlegroups.com Prochaines rencontres sur http://www.meetup.com/elasticsearchfr/ Slides sur http://fr.slideshare.net/dadoonet Sources sur https://github.com/elasticsearchfr/talks lundi 11 février 13