Using ElasticSearch as a fast, flexible, and scalable solution to search
- ccurrence records and checklists
Christian Gendreau, Canadensys Marie-Elise Lecoq, GBIF France
Using ElasticSearch as a fast, flexible, and scalable solution to - - PowerPoint PPT Presentation
Using ElasticSearch as a fast, flexible, and scalable solution to search occurrence records and checklists Christian Gendreau, Canadensys Marie-Elise Lecoq, GBIF France Introduction ElasticSearch is an open source, document oriented, distributed
Christian Gendreau, Canadensys Marie-Elise Lecoq, GBIF France
ElasticSearch is an open source, document oriented, distributed search engine, built on top of Apache Lucene.
From ElasticSearch GitHub page
Using the REST API
$ curl -XPUT 'http://localhost:9200/twitter/tweet/1'
"user" : "kimchy", "post_date" : "2009-11-15T14:12:12", "message" : "trying out Elastic Search" }'
Rivers
Database of Vascular Plants of Canada (VASCAN)
data.canadensys.net/vascan
Index structure for scientific names
Data stored in ElasticSearch are updated upon MongoDB changes. The search engine requests elasticsearch using filters like taxon, date, place, dataset and geolocalisation. Statistic calculation using facets
with no much differences
sharding) easier with elasticsearch
customization remains easy.
curl -XGET [...] "facets" : { ”dataset" : { "terms" : { "field" : ”dataset", "order" : "term” …
REST API
Java API
Example:
$ curl localhost:9200/vascan/_search?pretty=1 -d '{"query":{ "match":{ "name" :{ "query":"carex" } } } }’
Code example:
... SearchRequestBuilder srb = client.prepareSearch(INDEX_NAME) .setQuery(QueryBuilders .boolQuery() .should(QueryBuilders.matchQuery("vernacular_name",text)) .setTypes(VERNACULAR_TYPE); ...
data