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

Elasticsearch for PHP Developers

Elasticsearch for PHP Developers

Dd9d954997353b37b4c2684f478192d3?s=128

Elastic Co

July 15, 2015
Tweet

More Decks by Elastic Co

Other Decks in Programming

Transcript

  1. ELASTICSEARCH FOR PHP DEVELOPERS Shaunak Kashyap • @shaunak

  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 PHP, Python, ..., even Perl ☻ download Well-documented
  8. 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
  9. 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
  10. 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
  11. 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 ( ) ;
  12. None
  13. INDEXING A DOCUMENT

  14. RETRIEVING A DOCUMENT

  15. SEARCHING FOR DOCUMENTS QUERY PHASE

  16. FETCH PHASE

  17. RECIPE DEMO https://github.com/elastic/demo/tree/master/recipe_search

  18. THANK YOU https://discuss.elastic.co/