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

Elasticsearch for PHP Developers

Elasticsearch for PHP Developers

Elastic Co

July 15, 2015
Tweet

More Decks by Elastic Co

Other Decks in Programming

Transcript

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

    — just add or remove nodes as needed HTTP API Supported clients for PHP, Python, ..., even Perl ☻ download Well-documented
  2. 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
  3. 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
  4. WHY USE THE PHP CLIENT? Uses language idioms Low-level and

    unopinionated: maps 1-1 with HTTP API Cluster sniffing Load balances amongst nodes Detects and gracefully handles node failures Officially supported by Elastic Well-documented API
  5. INSTALLATION & USAGE $ p h p c o m

    p o s e r . p h a r r e q u i r e e l a s t i c s e a r c h / e l a s t i c s e a r c h < ? p h p r e q u i r e ' v e n d o r / a u t o l o a d . p h p ' ; $ c l i e n t = n e w E l a s t i c s e a r c h \ C l i e n t ( ) ;