Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introduction to Elasticsearch — That Conference

Introduction to Elasticsearch — That Conference

Dd9d954997353b37b4c2684f478192d3?s=128

Elastic Co

August 10, 2015
Tweet

More Decks by Elastic Co

Other Decks in Programming

Transcript

  1. INTRODUCTION TO ELASTICSEARCH Shaunak Kashyap • • Developer Advocate at

    @shaunak Elastic
  2. WHY USE ELASTICSEARCH?

  3. Full text search

  4. Structured search

  5. Faceted navigation

  6. Analytics

  7. FEATURES Easy to get started — , extract, run! Scalable

    — just add or remove nodes as needed HTTP API Supported clients for .NET, Node.js, ..., even Perl ☻ download Well-documented
  8. SOME CONCEPTS Document The unit of data fed into Elasticsearch,

    in JSON format Index A collection of documents stored in Elasticsearch Type The category of the document within an index { " f r o m " : " t o n y @ s t a r k . c o m " , " t o " : [ " t h o r @ a v e n g e r s . o r g " , " n a t a s h a @ a v e n g e r s . o r g " ] , " s u b j e c t " : " I n f i n i t y S t o n e s " , " b o d y " : " . . . " }
  9. None
  10. None
  11. MORE CONCEPTS Shard A part of an index, consisting of

    a subset of documents in that index Node A running Elasticsearch process Cluster A collection of nodes that can communicate with each other and share the same c l u s t e r . n a m e
  12. None
  13. A CLUSTER OF ONE NODE C : \ e l

    a s t i c s e a r c h - 1 . 7 . 0 > b i n \ e l a s t i c s e a r c h
  14. CREATING AN INDEX P U T / t w i

    t t e r { " s e t t i n g s " : { " n u m b e r _ o f _ s h a r d s " : 3 , " n u m b e r _ o f _ r e p l i c a s " : 1 } }
  15. ADD ANOTHER NODE C : \ e l a s

    t i c s e a r c h - 1 . 7 . 0 > b i n \ e l a s t i c s e a r c h
  16. SCALING HORIZONTALLY C : \ e l a s t

    i c s e a r c h - 1 . 7 . 0 > b i n \ e l a s t i c s e a r c h
  17. LOSE A NODE C : \ e l a s

    t i c s e a r c h - 1 . 7 . 0 > b i n \ e l a s t i c s e a r c h . . . C t r l - C
  18. INDEXING A DOCUMENT P U T / t w i

    t t e r / t w e e t / 3 1 1 3 3 5 3 6 1 1 6 9 1 9 5 0 0 9 { " m e s s a g e " : " I n s t a r t u p w e a r e p r a c t i c e O u t a g e D r i v e n I n f r a s t r u c t u r e . " , " @ t i m e s t a m p " : " 2 0 1 3 - 0 3 - 1 2 T 0 4 : 3 8 : 2 9 . 0 0 0 Z " }
  19. SEARCHING FOR DOCUMENTS G E T t w i t

    t e r / _ s e a r c h ? q = d e v o p s QUERY PHASE
  20. FETCH PHASE

  21. TODAY WE LEARNED Types of applications that can be built

    with Elasticsearch Key features of Elasticsearch Some sample index, search, and aggregations queries Key concepts How clusters work under the hood How indexing and searching work under the hood
  22. THANK YOU Shaunak Kashyap • Developer Advocate at • Elastic

    @shaunak https://discuss.elastic.co/