Taming Your Data With Elasticsearch - Madison PHP

D12eaf3ef46e4f0fc6b714fd2b7ffe3b?s=47 derek-b
September 13, 2018

Taming Your Data With Elasticsearch - Madison PHP

Are you searching unstructured data or text fields? Do you need to aggregate and summarize your geo, financial, or other numeric data? Do you want to query your structured data in new and exciting ways? If so, Elasticsearch may be right for you. Let’s explore the many ways you can ask questions of your data and have it make sense to you and your users. We’ll sort through millions of rows in milliseconds and give you the tools to take your data analysis to the next level. You will learn how to use basic RESTful API calls to store, search, and aggregate your data.

D12eaf3ef46e4f0fc6b714fd2b7ffe3b?s=128

derek-b

September 13, 2018
Tweet

Transcript

  1. Taming Your Data with Elasticsearch

  2. Hello! I Am Derek Binkley Senior Engineer with TurnTo Networks

    Volunteer with Community Justice @DerekB_WI binkleyd@yahoo.com
  3. Customer Generated Content

  4. Fast Searching Scalability Finding Value within a Sea of Data

  5. What is it? open-source, RESTful, distributed search and analytics engine

    built on Apache Lucene Elasticsearch Tool for querying and exploring data Kibana
  6. How is it stored? A grouping of JSON documents with

    similar structure. Index Defines what is contained in a document Mapping A JSON document stores each data element. Document
  7. Storing Data

  8. Store new document POST

  9. Specify ID to update or insert PUT

  10. Created automatically or manually Updated automatically Mapping

  11. Mapping

  12. Define empty index Setup document structure https:/ /www.elastic.co/guide/en/ elasticsearch/reference/current/indices- put-mapping.html

    Put Mapping
  13. Storing Data with PHP

  14. Guzzle converts array to JSON body Put Mapping

  15. Guzzle converts array to JSON body Post

  16. Update Data

  17. Automatically assigned - POST Manually assigned - PUT ID

  18. Replaces document if exists Adds new if not exists PUT

    DOC
  19. Only updates named fields Update Fields

  20. Replaces document if exists Adds new if not exists Script

    Update
  21. Searching Data

  22. Define query in JSON body match_all finds everything Query Keyword

  23. Looking for best results Find a Match

  24. Results are scored Find a Match

  25. Results are scored Search Within Text

  26. Results are scored Search Within Text

  27. Damereau-Levenshtein Distance Fuzziness

  28. more_like_this query Similar Documents

  29. Paginating Data

  30. Aggregating

  31. Query unique results or keywords What’s In a Field

  32. Query unique results or keywords that get sorted into “buckets”

    What’s In a Field
  33. Calculate summary values such as avg Metrics

  34. Calculate summary values such as avg Metrics

  35. Group documents into buckets Buckets with Metrics

  36. Group documents into buckets Buckets with Metrics

  37. Geo Points

  38. Find results with a distance of a point Distance Search

  39. Filter by geo, aggregate by term Distance Aggregation

  40. Filter by geo, aggregate by term Distance Aggregation

  41. Complex mapping applications can be created by using four types

    of queries Uses GeoJSON to define shape GeoShape Define top_left and bottom_right Geo Bounding Box Geo searches Previous example Geo Distance Define points to create a polygon Geo Polygon
  42. ANY QUESTIONS? You can find me at @DerekB_WI binkleyd@yahoo.com Thanks!

  43. https://www.elastic.co/blog/found-elasticsearch-from-the-bottom-up https://en.wikipedia.org/wiki/Damerau-Levenshtein_distance https://lucene.apache.org/ https://www.elastic.co/guide/en/elasticsearch/painless/current/painless-getting-started.html http://geojson.org/ Resources