Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Agenda
❑ What Is Artificial Intelligence ?
❑ What Is...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
APIs6
Agenda
What Is Elasticsearch? 1
Advantages 3
I...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
What Is Elasticsearch?
Let’s understand what is Elas...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
What Is Elasticsearch?
• Real time distributed and a...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Why Elasticsearch?
Let’s understand why we are using...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Why Elasticsearch?
Query
• Lets you perform and comb...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Why Elasticsearch?
Show files where
place is Dubai
D...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Why Elasticsearch?
Dubai DubaiDubaiDubai Dubai
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Why Elasticsearch?
Aggregate data by
days
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Why Elasticsearch?
Aggregate posts
by geography
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Advantages Of Elasticsearch
Let’s now see what all b...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Advantages Of Elasticsearch
Really Fast
Scalability
...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Advantages Of Elasticsearch
Autocompletion &
Instant...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Installation
Let’s now install Elasticsearch.
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Installation
1
Install the latest Java version.
OR
I...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Installation
2
3
Go to
https://www.elastic.co/downlo...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Installation
4 Unzip the file
5
Go to bin folder
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Installation
6
Double click on
elasticsearch.bat file
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Installation
6 Wait for Elasticsearch to start
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Installation
6 Open a browser and type localhost:920...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Installation
7 You need to add the Sense(beta) plugi...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Basic Concepts
Before you dive into Elasticsearch le...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Near Real Time
Elasticsearch is a near real time sea...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Index
An index is a collection of documents with sim...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Basic Concepts
Document
A document is a basic unit o...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
API Conventions
Let’s now find out the API Conventio...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
API Conventions
Multiple Indices
Date Math Support
i...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
API Conventions
Multiple Indices
Date Math Support
i...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
API Conventions
Multiple Indices
Date Math Support
i...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
API Conventions
Multiple Indices
Date Math Support
i...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
API Conventions
Multiple Indices
Date Math Support
i...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Elasticsearch APIs
Let’s now find out different type...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
1 532 4
Document APIs
Search APIs Index APIs
Aggrega...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
1 532 4
Search APIs Index APIs
Aggregation Cluster A...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Document API
Single Document API Multi-Document API
...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Document API – CRUD Operations
• Index API
• Get API...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Document API – CRUD Operations
• Index API
• Get API...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Document API – CRUD Operations
• Index API
• Get API...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Document API – CRUD Operations
• Index API
• Get API...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
1 532 4
Document APIs
Search APIs Index APIs
Aggrega...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Search API
Using a search API, you can execute a sea...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Search API
Using URI: q searchExample:
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
1 532 4
Document APIs
Search APIs Index APIs
Aggrega...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Aggregation
"aggregations" : {
"<aggregation_name>" ...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Aggregation - Types
Bucketing Metric
Matrix Pipeline
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
1 532 4
Document APIs
Search APIs Index APIs
Aggrega...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Index API
Index APIs are responsible for managing al...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
1 532 4
Document APIs
Search APIs Index APIs
Aggrega...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Cluster API
Cluster API is used for getting informat...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Query DSL
Let’s now find out how Query DSL is used t...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Leaf Query Clauses
Query DSL
Elasticsearch provides ...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Mapping
Let’s now find out how documents are mapped ...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Mapping
Mapping is the process of defining how a doc...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Mapping
Dynamic Mapping
Mapping Parameters
✓ Analyze...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Analysis
Let’s now find out how data is configured.
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Analysis
During a search operation when a query is p...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Modules
Let’s now find out modules and it’s differen...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Static Setting
Modules
Elasticsearch is composed of ...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Modules Types
Discovery
Gateway
HTTP
Indices
Network...
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Demo
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Popularity
Próxima SlideShare
Cargando en…5
×

Elasticsearch Tutorial | Getting Started with Elasticsearch | ELK Stack Training | Edureka

823 visualizaciones

Publicado el

( ELK Stack Training - https://www.edureka.co/elk-stack-trai... )
This Edureka Elasticsearch Tutorial will help you in understanding the fundamentals of Elasticsearch along with its practical usage and help you in building a strong foundation in ELK Stack. This video helps you to learn following topics:

1. What Is Elasticsearch?
2. Why Elasticsearch?
3. Elasticsearch Advantages
4. Elasticsearch Installation
5. API Conventions
6. Elasticsearch Query DSL
7. Mapping
8. Analysis
9 Modules

Publicado en: Tecnología
  • Sé el primero en comentar

Elasticsearch Tutorial | Getting Started with Elasticsearch | ELK Stack Training | Edureka

  1. 1. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Agenda ❑ What Is Artificial Intelligence ? ❑ What Is Machine Learning ? ❑ Limitations Of Machine Learning ❑ Deep Learning To The Rescue ❑ What Is Deep Learning ? ❑ Deep Learning Applications
  2. 2. Copyright © 2017, edureka and/or its affiliates. All rights reserved. APIs6 Agenda What Is Elasticsearch? 1 Advantages 3 Installation 4 API Conventions 5 Mapping8 Analysis9 Modules10 Why Elasticsearch? 2 Query DSL7
  3. 3. Copyright © 2017, edureka and/or its affiliates. All rights reserved. What Is Elasticsearch? Let’s understand what is Elasticsearch.
  4. 4. Copyright © 2017, edureka and/or its affiliates. All rights reserved. What Is Elasticsearch? • Real time distributed and analytics engine • Open Source developed in Java • Elasticsearch is based on the Lucene engine on top of which we have a rest interface. • Supports full-text search i.e completely document based instead of tables and schemas • Used for Single Page Application Projects
  5. 5. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Why Elasticsearch? Let’s understand why we are using Elasticsearch.
  6. 6. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Why Elasticsearch? Query • Lets you perform and combine many types of searches like structured, unstructured, geo, metric etc. • You can ask a query “anyway you want” • Lets you understand billions of log lines easily • Provides aggregations which help you zoom out to explore trends and patterns in your data Analyze
  7. 7. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Why Elasticsearch? Show files where place is Dubai Dubai Dubai DubaiDubai Dubai
  8. 8. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Why Elasticsearch? Dubai DubaiDubaiDubai Dubai
  9. 9. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Why Elasticsearch? Aggregate data by days
  10. 10. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Why Elasticsearch? Aggregate posts by geography
  11. 11. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Advantages Of Elasticsearch Let’s now see what all benefits Elasticsearch provides.
  12. 12. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Advantages Of Elasticsearch Really Fast Scalability MultilingualA
  13. 13. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Advantages Of Elasticsearch Autocompletion & Instant Search Document Oriented Schema Free Science Scientist sc
  14. 14. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Installation Let’s now install Elasticsearch.
  15. 15. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Installation 1 Install the latest Java version. OR If you already have Java Installed then check for its version using java –version command in cmd NOTE: Java version must be 7 or more
  16. 16. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Installation 2 3 Go to https://www.elastic.co/downloads Click on Download to get the zip file
  17. 17. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Installation 4 Unzip the file 5 Go to bin folder
  18. 18. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Installation 6 Double click on elasticsearch.bat file
  19. 19. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Installation 6 Wait for Elasticsearch to start
  20. 20. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Installation 6 Open a browser and type localhost:9200 7 If you can see this message on the browser that means your Elasticsearch is up and running
  21. 21. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Installation 7 You need to add the Sense(beta) plugin which will act as an developers interface to Elasticsearch
  22. 22. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Basic Concepts Before you dive into Elasticsearch let’s see few core concepts of Elasticsearch.
  23. 23. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Near Real Time Elasticsearch is a near real time search platform that is there is a slight from the time you index a document until the time it becomes searchable Basic Concepts Cluster A cluster is a collection of one or more nodes that together holds the entire data. It provides federated indexing and search capabilities across all nodes and is identified by a unique name (by default it is ‘elasticsearch’) Node A node is a single server which is a part of cluster, stores data and participates in the cluster’s indexing and search capabilities
  24. 24. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Index An index is a collection of documents with similar characteristics and is identified by a name. This name is used to refer to the index while performing indexing, search, update, and delete operations against the documents in it. Type A type is a logical category/ partition of an index whose semantics is completely. It is defined for documents that have a set of common fields. You can define more than one type in your index Basic Concepts
  25. 25. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Basic Concepts Document A document is a basic unit of information which can be indexed. It is expressed in JSON which is an ubiquitous internet data interchange format Shards Elasticsearch provides the ability to subdivide the index into multiple pieces called shards. Each shard is in itself a fully-functional and independent "index" that can be hosted on any node within the cluster Replicas Elasticsearch allows you to make one or more copies of your index’s shards which are called replica shards or replica
  26. 26. Copyright © 2017, edureka and/or its affiliates. All rights reserved. API Conventions Let’s now find out the API Conventions in Elasticsearch.
  27. 27. Copyright © 2017, edureka and/or its affiliates. All rights reserved. API Conventions Multiple Indices Date Math Support in Index Name Common Options URL based Access Control The elasticsearch REST APIs are accessed using JSON over HTTP. Elasticsearch uses following conventions throughout the REST API:
  28. 28. Copyright © 2017, edureka and/or its affiliates. All rights reserved. API Conventions Multiple Indices Date Math Support in Index Name URL based Access Control Common Options • Most APIs support execution across multiple indices • Different notations are used to perform operations in multiple indices like: o Comma separated notations demo1,demo2,demo3 o Wildcard notations (*,+,-) demo*,de*o2,+demo3,-demo3 o _all keyword for all indices o URL Query String Parameters a. ignore_unavailable b. allow_no_indices c. expand_wildcards
  29. 29. Copyright © 2017, edureka and/or its affiliates. All rights reserved. API Conventions Multiple Indices Date Math Support in Index Name URL based Access Control Common Options • Elasticsearch lets you to search indices according to date and time. • You need to specify date and time in a specific format like: <static_name{date_math_expr{date_format|time_zone}}> static text part of the name computes the date dynamically optional date format optional time zone
  30. 30. Copyright © 2017, edureka and/or its affiliates. All rights reserved. API Conventions Multiple Indices Date Math Support in Index Name URL based Access Control Common Options • Following are the common options for all the REST APIs: o Pretty Result o Human Readable Output o Date Math o Response Filtering o Flat Settings o Parameter o No Values o Time Units o Byte Size Units o Unit-less quantities o Distance Units o Fuzziness o Enabling Stack Traces o Request Body In Query String
  31. 31. Copyright © 2017, edureka and/or its affiliates. All rights reserved. API Conventions Multiple Indices Date Math Support in Index Name URL based Access Control Common Options • Users can also use a proxy with URL-based access control to secure access to the Elasticsearch indices • User has an option of specifying an index in the URL and on each individual request within the request body for some requests like: o multi-search o multi-get o bulk
  32. 32. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Elasticsearch APIs Let’s now find out different types of APIs in Elasticsearch.
  33. 33. Copyright © 2017, edureka and/or its affiliates. All rights reserved. 1 532 4 Document APIs Search APIs Index APIs Aggregation Cluster APIs Elasticsearch APIs
  34. 34. Copyright © 2017, edureka and/or its affiliates. All rights reserved. 1 532 4 Search APIs Index APIs Aggregation Cluster APIsDocument APIs Elasticsearch APIs
  35. 35. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Document API Single Document API Multi-Document API • Index API • Get API • Update API • Delete API • Multi Get API • Bulk API • Delete By Query API • Update By Query API • Reindex API
  36. 36. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Document API – CRUD Operations • Index API • Get API • Update API • Delete API Creating the document
  37. 37. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Document API – CRUD Operations • Index API • Get API • Update API • Delete API Reading the document
  38. 38. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Document API – CRUD Operations • Index API • Get API • Update API • Delete API Updating the document
  39. 39. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Document API – CRUD Operations • Index API • Get API • Update API • Delete API Deleting the document
  40. 40. Copyright © 2017, edureka and/or its affiliates. All rights reserved. 1 532 4 Document APIs Search APIs Index APIs Aggregation Cluster APIs Elasticsearch APIs
  41. 41. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Search API Using a search API, you can execute a search query and get back search hits that match the query Multi - Type URI Search Multi Index You can search for the documents present in all the indices or in some specific indices You can search all the documents in an index across all types or in some specified type Various parameters can be passed in a search operation using Uniform Resource Identifier: • q • lenient • fields • sort • timeout • terminate_after • from • size
  42. 42. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Search API Using URI: q searchExample:
  43. 43. Copyright © 2017, edureka and/or its affiliates. All rights reserved. 1 532 4 Document APIs Search APIs Index APIs Aggregation Cluster APIs Elasticsearch APIs
  44. 44. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Aggregation "aggregations" : { "<aggregation_name>" : { "<aggregation_type>" : { <aggregation_body> } [,"meta" : { [<meta_data_body>] } ]? [,"aggregations" : { [<sub_aggregation>]+ } ]? } [,"<aggregation_name_2>" : { ... } ]* } Aggregation collects all the data which is selected by the search query. This framework consists of many building blocks called aggregators, which help in building complex summaries of the data
  45. 45. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Aggregation - Types Bucketing Metric Matrix Pipeline
  46. 46. Copyright © 2017, edureka and/or its affiliates. All rights reserved. 1 532 4 Document APIs Search APIs Index APIs Aggregation Cluster APIs Elasticsearch APIs
  47. 47. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Index API Index APIs are responsible for managing all the aspects of index like settings, aliases, mappings, index templates Create Index Delete Index Get Index Index Exits Open/ Close Index API Index Aliases Index Settings Analyze Index Template Index Stats Flush Refresh
  48. 48. Copyright © 2017, edureka and/or its affiliates. All rights reserved. 1 532 4 Document APIs Search APIs Index APIs Aggregation Cluster APIs Elasticsearch APIs
  49. 49. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Cluster API Cluster API is used for getting information about cluster and its nodes and making changes in them Cluster Health Cluster State Cluster Stats Pending Cluster Task Cluster Reroute Node Stats Nodes hot_threads
  50. 50. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Query DSL Let’s now find out how Query DSL is used to define queries.
  51. 51. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Leaf Query Clauses Query DSL Elasticsearch provides a full Query DSL based on JSON to define queries. Query DSL is an AST of queries, consisting of two types of clause: 1 Compound Query Clauses2
  52. 52. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Mapping Let’s now find out how documents are mapped in elasticsearch.
  53. 53. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Mapping Mapping is the process of defining how a document, and the fields that it contains, are stored and indexed Mapping Types Meta - fields 1 Fields or properties 2 Field Data Types Core Data Types 1 Specialized Data Types 4 Geo Data Types 3 Complex Data Types 2
  54. 54. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Mapping Dynamic Mapping Mapping Parameters ✓ Analyzer ✓ Boost ✓ Coerce ✓ copy_to ✓ doc_values ✓ Dynamic ✓ Enabled ✓ Fielddata ✓ Geohash ✓ geohash_precision ✓ geohash_prefix ✓ Format ✓ ignore_above ✓ ignore_malformed ✓ include_in_all ✓ index_options ✓ lat_lon ✓ Index ✓ Fields ✓ Norms ✓ null_value ✓ position_increment_gap ✓ Properties ✓ search_analyser ✓ Similarity ✓ Store ✓ term_vector
  55. 55. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Analysis Let’s now find out how data is configured.
  56. 56. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Analysis During a search operation when a query is processed , the content in any index is analysed by analysis module Analyzers1 Token Filter3 Tokenizer Character Filter 2 4
  57. 57. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Modules Let’s now find out modules and it’s different types in elasticsearch
  58. 58. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Static Setting Modules Elasticsearch is composed of a number of modules, which are mainly responsible for its functionality These modules have 2 types of settings: Dynamic Setting These settings need to be configured in the config (elasticsearch.yml) file before starting the Elasticsearch These settings can be set on live Elasticsearch.
  59. 59. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Modules Types Discovery Gateway HTTP Indices Network Node Client Painless Plug-in Scripting Snapshot /Restore Thread pools Transport Tribe nodes Cross Cluster Search Cluster-level routing and shard allocation
  60. 60. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Demo
  61. 61. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Popularity

×