David Pilato

Developer | Evangelist Elastic
20+ years of experience, mostly in Java. Living in Cergy, France.

Self Introduction

Developer | Evangelist at elastic and creator of the Elastic French User Group. Frequent speaker about all things Elastic, in conferences, for User Groups and in companies with BBL talks. In my free time, I enjoy coding and DeeJaying, just for fun. Living with my family in Cergy, France.


I discovered Elasticsearch project in 2011. After contributed to the project and created open source plugins for it, David joined elastic the company in 2013 where he is Developer and Evangelist. He also created and still actively managing the French spoken language User Group. At elastic, he mainly worked on Elasticsearch source code, specifically on open-source plugins. In his free time, he likes talking about elasticsearch in conferences or in companies (Brown Bag Lunches AKA BBLs). He is also author of FSCrawler project which helps to index your pdf, open office, whatever documents in elasticsearch using Apache Tika behind the scene.

Visited countries

You can see here the countries I have visited so far. Most of them are for business purpose but who said you can not do both: business and leisure?

38 countries visited

La potion magique pour faire avancer ta carrière

Voici la transcription d’une présentation que j’ai eu le plaisir à donner lors du Camping des speakers 2022, dont il s’agissait de la première édition. La potion magique pour faire progresser ta carrière 10h15 - 15 minutes - Autour du Feu La recette de la potion magique ne se transmet qu’aux seuls druides, normalement. Mais exceptionnellement, le conseil des druides de la forêt des Carnutes m’a autorisé à vous révéler quelques uns des ingrédients qui constituent ce breuvage.
Featured Image

9 years! A whole new world.

I have been missing you! Indeed, last year, I have not been able to publish my anniversary blog post as I’m used to do every year since I joined Elastic 9 years ago. That was for a technical reason actually. I was using a old and not updated blogging platform and it took me a looooong time before I was able to invest time to switch everything to Hugo. So here we go! This year celebrates my 9 years anniversary at elastic but also a new blogging system.
Featured Image

7 years! Finding the right balance

What a ride! 10 employees to around 2000 now. As I imagined 8 years ago, I still think that Elasticsearch (the product) and elastic (the company) are successful. Becoming a public company did not change a lot my daily activities. I’m still on the road meeting/building the community, specifically in France and making sure people are sharing the same love that we have internally for the products we are building. I’d like this year to focus this anniversary blog post on some items:
Featured Image

From a startup to a listed company. 6 years of fun!

When I joined Elastic (formerly Elasticsearch) it was a startup with 10 employees + the founders. As one of those first employees I was invited (with #elkie and my wife) to the NYSE event where Elastic went listed as ESTC symbol. Some of us there (Rashid, Karel, Myself, Igor, Costin, Luca, Clinton). Yeah. You are not probably used to see us wearing a suit! :) If you want to read again my story, it’s there:
Featured Image

Enriching your postal addresses with Elastic stack - part 3

This blog post is part of a series of 3: Importing Bano dataset with Logstash Using Logstash to lookup for addresses in Bano index Using Logstash to enrich an existing dataset with Bano In the previous post, we described how we can transform a postal address to a normalized one with also the geo location point or transform a geo location point to a postal address. Let’s say we have an existing dataset we want to enrich.
Featured Image

Enriching your postal addresses with Elastic stack - part 2

This blog post is part of a series of 3: Importing Bano dataset with Logstash Using Logstash to lookup for addresses in Bano index Using Logstash to enrich an existing dataset with Bano In the previous post, we described how we indexed data coming from the BANO project so we now have indices containing all the french postal addresses. Let’s see what we can do now with this dataset. Searching for addresses Good. Can we use a search engine to search?
Featured Image

Enriching your postal addresses with Elastic stack - part 1

This blog post is part of a series of 3: Importing Bano dataset with Logstash Using Logstash to lookup for addresses in Bano index Using Logstash to enrich an existing dataset with Bano I’m not really sure why, but I love the postal address use case. Often in my career I had to deal with that information. Very often the information is not well formatted so it’s hard to find the information you need when you have as an input a not so nice dataset.
Featured Image

5 years. What a milestone!

What a milestone! Can you imagine how changed the company in the last 5 years? From 10 employees when I joined to more than 700 now! If you want to read again my story, it’s there: 2013: Once upon a time… 2014: Once upon a time: a year later… 2015: Once upon a time: Make your dreams come true 2016: 3 years! Time flies! 2017: 4 years at elastic! Before speaking about what happened the last 5 years for me, let’s modify a bit the script I wrote last year.
Featured Image

4 years at elastic!

This post is starting to become a long series 😊 Yeah! That’s amazing! I just spent 4 years working at elastic and I’m starting my happy 5th year! If you want to read again my story, it’s there: 2013: Once upon a time… 2014: Once upon a time: a year later… 2015: Once upon a time: Make your dreams come true 2016: 3 years! Time flies! This year, I will celebrate this by writing a new tutorial…
Featured Image

Elasticsearch real integration tests with security enabled

In a recent post we have seen how to create real integration tests. Those tests launch a real elasticsearch cluster, then run some tests you write with JUnit or your favorite test framework then stop the cluster. But sometimes, you may want to add existing plugins in your integration test cluster. For example, you might want to use X-Pack to bring fantastic features such as: Security Alerting Monitoring Graph Reporting Let’s see how you can do that with Maven and Ant again…

Creating Elasticsearch Transport Action

This blog post is part of a series which will teach you: How to write a plugin for elasticsearch 5.0 using Maven. How to add a new REST endpoint plugin to elasticsearch 5.0. How to use Transport Action classes (what you are reading now). How I wrote the ingest-bano plugin which will be hopefully released soonish. In this plugin, new REST endpoints have been added. In the previous article, we discovered how to add a REST plugin.

Adding a new REST endpoint to elasticsearch

This blog post is part of a series which will teach you: How to write a plugin for elasticsearch 5.0 using Maven. How to add a new REST endpoint plugin to elasticsearch 5.0 (what you are reading now). How I wrote the ingest-bano plugin which will be hopefully released soonish. In this plugin, new REST endpoints have been added. Imagine that you wish to add a new REST endpoint so you can send requests like:

Elasticsearch real integration tests

Integration tests… How do you run them? Often, you are tempted to run services you want to test from JUnit for example. In elasticsearch, you can extend ESIntegTestCase class which will start a cluster of a given number of nodes. public class BanoPluginIntegrationTest extends ESIntegTestCase { public void testPluginIsLoaded() throws Exception { // Your code here } } But to be honest, the test you are running does not guarantee that you will have the same result in production.

Creating an Ingest plugin for elasticsearch

This blog post is part of a series which will teach you: How to write a plugin for elasticsearch 5.0 using Maven. How to write an ingest plugin for elasticsearch 5.0 (what you are reading now). How I wrote the ingest-bano plugin which will be hopefully released soonish. Today, we will focus on writing an Ingest plugin for elasticsearch. Hey! Wait! You wrote Ingest? What is that? Ingest is a new feature coming in elasticsearch 5.

Creating a plugin for elasticsearch 5.0 using Maven

Elasticsearch 5.0 switched to Gradle in October 2015. You can obviously write a plugin using Gradle if you wish and you could benefit from all the goodies elasticsearch team wrote when it comes to integration tests and so on. My colleague, Alexander Reelsen aka Spinscale on Twitter, wrote a super nice template if you wish to create an Ingest plugin for 5.0. Hey! Wait! You wrote Ingest? What is that? Ingest is a new feature coming in elasticsearch 5.

And the beats go on!

Sounds like a cool music, right? At least this is one of my favorite tracks. May be some of you already know that, I enjoy doing some DeeJaying for my friends. But today, I want to speak about another kind of beats. Elastic beats! Elastic Beats Actually my favorite funky music track is a one from Georges Duke: Reach out! But this is another story… Beats So what are beats? Beats are lightweight shippers that collect and ship all kinds of operational data to Elasticsearch
Featured Image

3 years! Time flies!

3 years! Can you imagine that? Already 3 years spent working at elastic? Time flies! 2015 has been an uncommon year for me. Not because Marty Mc Fly and Doc Emmett Brown finally arrived… Not because, Han Solo, Leia and friends were finally back again… But for technical and also personal reasons. On a personal side, I had to deal with two major issues which cause some slow down in my professional activities. I had to cancel some conferences for instance.
Featured Image

Understanding Zipf's law

I just discovered a nice video which explains the Zipf’s law. I’m wondering if I can index the french lexique from Université de Savoie and find some funny things based on that… Download french words wget http://www.lexique.org/listes/liste_mots.txt head -20 liste_mots.txt What do we have? It’s a CSV file (tabulation as separator): 1_graph 8_frantfreqparm 0 279.84 1 612.10 2 1043.90 3 839.32 4 832.23 5 913.87 6 603.42 7 600.61 8 908.03 9 1427.45 a 4294.90 aa 0.
Featured Image

Building a directory map with ELK

I gave a BBL talk recently and while chatting with attendees, one of them told me a simple use case he covered with elasticsearch: indexing metadata files on a NAS with a simple ls -lR like command. His need is to be able to search on a NAS for files when a user wants to restore a deleted file. As you can imagine a search engine is super helpful when you have hundreds of millions files!
Featured Image

Index Twitter on found

Some months ago, I published a recipe on how to index Twitter with Logstash and Elasticsearch. I have the same need today as I want to monitor Twitter when we run the elastic FR meetup (join us by the way if you are in France!). Well, this recipe can be really simplified and actually I don’t want to waste my time anymore on building and managing elasticsearch and Kibana clusters anymore. Let’s use a Found by elastic cluster instead.
Featured Image

Next movie to watch based on recommendation

This article is based on Recommender System with Mahout and Elasticsearch tutorial created by MapR. It now uses the 20M MovieLens dataset which contains: 20 million ratings and 465 000 tag applications applied to 27 000 movies by 138 000 users and was released in 4/2015. The format with this recent version has changed a bit so I needed to adapt the existing scripts to the new format. Prerequisites Download the 20M MovieLens dataset. Unzip it.

Importing from a database without a database

Recently, I got a database MySQL dump and I was thinking of importing it into elasticsearch. The first idea which pops up was: install MySQL import the database read the database with Logstash and import into elasticsearch drop the database uninstall MySQL Well. I found that some of the steps are really not needed. I can actually use ELK stack and create a simple recipe which can be used to import SQL dump scripts without needing to actually load the data to a database and then read it again from the database.

Indexing Twitter with Logstash and Elasticsearch

I’m often running some demos during conferences where we have a booth. As many others, I’m using Twitter feed as my datasource. I have been using Twitter river plugin for many years but, you know, rivers have been deprecated. Logstash 1.5.0 provides a safer and more flexible way to deal with tweets with its twitter input. Let’s do it! Let’s assume that you have already elasticsearch 1.5.2, Logstash 1.5.0 and Kibana 4.0.2 running on your laptop or on a cloud instance.
Featured Image

Reindex elasticsearch with Logstash

Sometimes, you would like to reindex your data to change your mapping or to change your index settings or to move from one server to another or to one cluster to another (think about multiple data centers for example). For the later you can use Snapshot and Restore feature but if you need to change any index settings, you need something else. With Logstash 1.5.0, you can now do it super easily using elasticsearch input and elasticsearch output.
Featured Image

Using JS Auth with found cluster

Using Found by elastic cluster helps a lot to have a ready to use and managed elasticsearch cluster. I started my own cluster yesterday to power brownbaglunch.fr website (work in progress) and it was ready to use after some clicks! It’s a kind of magic! But I ran into an issue when you secure it and use the elasticsearch javascript client. Creating your cluster Found Console Adding ACL By default, your cluster is opened but you can fix that by opening “Access Control” menu.
Featured Image

Advanced search for your Legacy application

I gave recently a talk at Voxxed Istanbul 2015 and I’d like to share here the story of this talk. The talk was about adding a real search engine for your legacy application. Here “legacy” means an application which is still using SQL statements to execute search requests. Our current CRM application can visualize our customers. Each person is represented as a Person bean and have some properties like name, dateOfBirth, children, country, city and some metrics related to the number of clicks each person did on the car or food buttons on our mobile application (center of interests that is).
Featured Image

Devoxx France 2015

I gave recently a talk at Devoxx France 2015 with Colin Surprenant and I’d like to share here some of the examples we used for the talk. The talk was about “what my data look like?”. We said that our manager was asking us to answer some questions: who are our customers? how do they use our services? what do they think about us on Twitter? Our CRM database So we have a PostgreSQL database containing our data.
Featured Image

Exploring Capitaine Train dataset

Recently I saw a tweet where Capitaine Train team started to open data they have collected and enriched or corrected. Ouvrez, ouvrez, les données structurées. Capitaine Train libère les gares : https://t.co/y6DjWsbALF #opendata — Trainline France (@trainline_fr) April 23, 2015 I decided to play a bit with ELK stack and create a simple recipe which can be used with any other CSV like data. Prerequisites You will need: Logstash: I’m using 1.5.0-rc3. Elasticsearch: I’m using 1.
Featured Image

Using Log4J2 with Hibernate 4

I was trying to use Hibernate 4.3.8.Final with Log4J2 and I spent some hours to find why Hibernate was not using Log4J2 though it was declared in my pom.xml file. Actually, I hit issue JBLOGGING-107. The workaround is simply to add a more recent jboss-logging dependency than the one shipped by default with Hibernate 4.3.8.Final. <dependency> <groupId>org.jboss.logging</groupId> <artifactId>jboss-logging</artifactId> <version>3.2.1.Final</version> </dependency>

Once upon a time: Make your dreams come true

Oh wait! Already 2 years spent working for Elasticsearch? Time flies! After the first year, I wrote that I did 58 talks in 4 countries, 37 towns for about 18 000 kilometers traveled. I was pretty sure that things would continue to grow. This year, I spoke 78 times! Around 2 talks per week! I did around 48 000 kilometers. 8 000 km more than the earth’s circumference! I still can’t believe it… 12 countries. And no need to say that I love giving talks and sharing my enthusiasm about Elasticsearch!
Featured Image

Once upon a time: a year later...

I joined Elasticsearch Inc one year ago. Those were pretty exciting days! But now… It’s more than that! Really! You could think that after one year, my motivation would start to decrease. I have the total opposite feeling. Still excited by my job, by the company and by the project, but most of all by the amazing team I’m lucky to work with! Everyone is different and each of us adds different value to Elasticsearch. Personally, I learn a lot from my co-workers.
Featured Image

Once upon a time...

Once upon a time… In fact 2 years ago, I was looking for a way to make Hibernate search distributed on multiple nodes. My first idea was to store indexes in a single database shared by my nodes. Yes, it’s a stupid idea in term of performances but I would like to try to build it. Digging for source code, I came to the JdbcDirectory class from the compass project. And I saw on the compass front page something talking about the future of Compass and Elasticsearch.
Featured Image

Il était une fois : un conte de fées élastique !

Il était une fois… En fait, il y a 2 ans, je cherchais un moyen pour distribuer Hibernate search sur plusieurs noeuds. Ma première idée était de stocker les index dans une base de données partagée par les différents noeuds. Oui ! Il s’agit d’une idée stupide en terme de performances, mais j’avais envie d’essayer et de construire ce modèle. Après avoir cherché du code source, je suis finalement tombé sur la classe JdbcDirectory du projet Compass.
Featured Image

ScrutMyDocs : un moteur de recherche pour documents

Avec Malloum, nous venons de publier notre premier projet open-source commun: Scrut My Docs ! Technical overview Nos objectifs Fournir une application web clé en main permettant d’indexer des documents de vos disques locaux. Fournir à la communauté Elasticsearch un modèle de base pour développer votre propre webapp pour une utilisation simple de recherche (« à la google »). Aider les débutants Elasticsearch Java avec des exemples concrets en Java Les technologies employées Elasticsearch ! et son écosystème (rivers, plugins) Spring JSF Primefaces Comment démarrer ?
Featured Image

La factory Spring pour Elasticsearch est sortie !

Et voilà, la première release de la factory spring vient d’être faite. Vous pouvez donc maintenant l’utiliser dans vos projets Maven : <dependency> <groupId>fr.pilato.spring</groupId> <artifactId>spring-elasticsearch</artifactId> <version>0.0.1</version> </dependency> Le code source est disponible sur github.

Protéger son cluster Elasticsearch avec Jetty

Nativement, Elasticsearch expose l’ensemble de ses services sans aucune authentification et donc une commande du type curl -XDELETE http://localhost:9200/myindex peut faire de nombreux dégâts non désirés. De plus, si vous développez une application JQuery avec un accès direct depuis le poste client à votre cluster Elasticsearch, le risque qu’un utilisateur joue un peu avec votre cluster est grand ! Alors, pas de panique… La société Sonian Inc. a open sourcé son plugin Jetty pour Elasticsearch pour notre plus grand bonheur 😉

Une factory Spring pour Elasticsearch

Le besoin Il existe dans Hibernate une fonctionnalité que j’aime beaucoup : la mise à jour automatique du schéma de la base en fonction des entités manipulées. Mon besoin est de faire quasiment la même chose avec Elasticsearch. C’est à dire que je souhaite pouvoir appliquer un mapping pour un type donné à chaque fois que je démarre mon projet (en l’occurrence une webapp). En me basant sur le projet développé par Erez Mazor, j’ai donc développé unefactory Spring visant à démarrer des clients (voire des noeuds) Elasticsearch.

Mon talk sur Elasticsearch sélectionné pour Devoxx France

Bonjour, C’est avec une certaine émotion et fierté que j’ai appris samedi dernier la sélection de mon talk sur Elasticsearch à Devoxx France. Devoxx France est une conférence organisée du 18 au 20 avril 2012 à Paris, pour les Développeurs. Y faire parti au milieu de talents incroyables est vraiment un honneur. Je suis d’autant plus comblé que je vais pouvoir parler du sujet qui me passionne depuis maintenant 1 an : Elasticsearch. A l’origine, Shay Banon devait venir lui-même nous parler de l’analyse des données avec les facettes Elasticsearch, mais il ne pourra malheureusement pas être présent.
Featured Image

Quel client Java pour elasticsearch ?

Il existe deux modes d’accès à elasticsearch en Java : Inscrire un noeud client dans le cluster elasticsearch Utiliser un client “simple” Noeud client dans un cluster elasticsearch L’idée de cette méthode est de fabriquer un noeud elasticsearch (node) qui démarre avec les mêmes caractéristiques qu’un noeud d’indexation et de recherche sauf qu’on lui précise qu’il n’hébergera pas de données. Pour cela, on utilise la propriété suivante : node.data=false Elle indique que le noeud que nous démarrons n’hébergera pas de données.

Mon premier plugin elasticsearch : RSS River

Il existe dans elasticsearch la notion de river (rivière) qui comme son nom le laisse supposer permet de voir s’écouler des données depuis une source jusqu’à elasticsearch. Au fur et à mesure que les données arrivent, la rivière les transporte et les envoie à l’indexation dans elasticsearch. En standard, il existe 4 rivières : CouchDB qui permet d’indexer toutes les nouveautés d’une base CouchDB. Voir aussi cet article à ce propos. RabbitMQ qui permet de récupérer des documents dans une queue de traitement asynchrone (genre JMS) Twitter qui permet d’indexer votre flux de messages twitter par exemple Wikipedia qui permet d’indexer toutes les nouveautés de l’encyclopédie au fur et à mesure de leurs publications Premiers pas J’ai commencé par bidouiller un peu la rivière CouchDB pour y apporter quelques fonctionnalités dont mes collègues avaient besoin :
Featured Image

Elasticsearch et les "facets"

Les aventures avec Elasticsearch se poursuivent. Combien de fois ai-je dit récemment que ce projet est absolument génial et qu’il va constituer à mon sens un des projets majeurs des prochaines années… Qui n’a pas besoin de moteur de recherche ? Qui s’est déjà “emmerdé” à fabriquer ça lui-même ou à utiliser des briques pouvant aider au prix d’une complexité plus ou moins grande de mise en oeuvre ? Je crois que nous sommes tous passés par là !


Après avoir testé Elasticsearch, me voici parti pour regarder ce monde étrange qu’on appelle le NoSQL… A dire vrai, j’ai entendu ce mot il y a quelques années, sans jamais vraiment m’y interesser… Après tout, une base de données non SQL, ça n’est tout simplement pas possible !!! Puis, à force de cotoyer le monde d’Elasticsearch et les technos JSon et REST, je me lance. Pour des raisons très pratiques, je choisis CouchDB de Apache. D’une part, il est directement intégrable avec Elasticsearch, et à la lecture rapide de sa documentation, il semble répondre à un des besoins auquel une équipe de mon pôle de développement est confrontée.
Featured Image

La recherche élastique...

Elasticsearch, un projet mature en quelques mois… A suivre de très près ! En cherchant un bout de code pour rendre la couche Hibernate Search facilement distribuable sur un cluster de machines JBoss, je suis tombé sur le projet Elasticsearch. Au début, un peu interloqué… Puis, je me lance… Je télécharge le projet. Je dézippe. Je lance… Miracle. En quelques secondes, je dispose d’un outil dans un Cloud, simple, me permettant d’indexer n’importe quel type de document, de le récupérer et de faire une recherche (au sens google du terme) sur n’importe quel champ… Et cela, quelque soit la technologie employée (Java, C#, .

Installation FusionForge 5.0 sur Redhat 5

Voici la suite de l’article sur l’installation d’une forge. Finalement, le temps d’obtenir une machine sous Redhat 5 a laissé le temps à la team FusionForge de sortir une release finale de la version 5.0. Nous voilà donc lancés dans cette installation que je me propose de décrire ici. A noter que pour le moment la forge n’est pas totalement opérationnelle. Des évolutions dans la configuration devront être menées et j’espère pouvoir tenir à jour cet article pour les décrire.
Featured Image

Utiliser Jetty 7 avec Maven

Jetty peut être très utile aux projets Maven, notamment dans la phase de tests d’intégration. Il faut souvent déployer l’application sur un serveur type JBoss puis lancer les tests. Avec Jetty, on dispose alors d’un conteneur léger qui permet de disposer des fonctionnalités essentielles d’un conteneur (webapp, datasource, …). Problème : avec la version 7 de Jetty, il faut gérer l’authentification. Sinon, on obtient une erreur du type : java.lang.IllegalStateException: No LoginService for org.eclipse.jetty.security.authentication.BasicAuthenticator@4095c5ec in ConstraintSecurityHandler@28f52a14@ J’ai trouvé la solution à ce problème sur le blog de Max Berger.

Problème Jetty / Maven sous Windows

Lorsqu’on souhaite lancer une WebApp avec le plugin Jetty sous Maven 2 depuis un PC sous windows on obtient une erreur référencée sous JIRA #JETTY-1063 : java.net.URISyntaxException: Illegal character in path at index 18: file:/C:/Documents and Settings/USER/.m2/repository/org/mortbay/jetty/jetty-maven-plugin/ Ce problème n’est résolu que sous Maven 3. Pour ceux qui souhaitent rester sous Maven 2 (Maven 3 est encore en version alpha), il faut modifier l’emplacement de la repository pour éviter le souci du caractère ESPACE présent dans le chemin C:\Documents and settings\USER\.

Utilisation du mode Lazy d'Hibernate avec Struts et Spring

Lorsqu’on utilise Hibernate pour déléguer la gestion de la persistence, se pose alors le classique problème de l’exception LazyInitialisationException. En effet, dans une modélisation assez classique, imaginons le cas suivant : Couche Modèle (ou DAO) Classe POJO contenant un attribut x et une collection cols @Entity @Inheritance(strategy=InheritanceType.SINGLE_TABLE) public class Dossier { @Id @GeneratedValue private Long id; private String x; @OneToMany(cascade=CascadeType.ALL) private Collections cols; // Getter et setters } Classe DAO Voir le blog pour l’utilisation des generics de Java5 afin d’éviter d’avoir à coder toujours les mêmes méthodes CRUD.

Publication de documentation fonctionnelle avec Maven

Voici une astuce permettant de laisser les analystes ou concepteurs utiliser leurs logiciels habituels de documentation (oOo ou Word), tout en permettant de publier automatiquement avec la génération du site un document PDF lisible par tous.

La mise en place d'une forge

Description de la mise en place de la forge GForge pour les besoins de mon centre informatique. Pour les besoins internes de la douane, j’ai proposé la mise en place d’une forge afin de consolider nos moyens de développement et de gestion de projets. Histoire d’être cohérent avec d’autres choix faits par l’administration, projet Adullact, j’ai retenu la forge GFORGE. Je vais décrire ici le processus d’installation que je vais suivre afin de partager cette information avec d’autres personnes qui pourraient être intéressés par cette démarche.

Découverte de Google App Engine pour Java

Je viens de découvrir Google App Engine pour Java. Je vais essayer de compléter cet article au fur et à mesure que je vais avancer dans son utilisation… Stay tuned…