
Elasticsearch 8.x Cookbook - Fifth Edition
Elasticsearch is a Lucene-based distributed search engine at the heart of the Elastic Stack that allows you to index and search unstructured content with petabytes of data. With this updated fifth edition, you'll cover comprehensive recipes relating to what's new in Elasticsearch 8.x and see how to create and run complex queries and analytics.
The recipes will guide you through performing index mapping, aggregation, working with queries, and scripting using Elasticsearch. You'll focus on numerous solutions and quick techniques for performing both common and uncommon tasks such as deploying Elasticsearch nodes, using the ingest module, working with X-Pack, and creating different visualizations. As you advance, you'll learn how to manage various clusters, restore data, and install Kibana to monitor a cluster and extend it using a variety of plugins. Furthermore, you'll understand how to integrate your Java, Scala, Python, and big data applications such as Apache Spark and Pig with Elasticsearch and create efficient data applications powered by enhanced functionalities and custom plugins.
By the end of this Elasticsearch cookbook, you'll have gained in-depth knowledge of implementing the Elasticsearch architecture and be able to manage, search, and store data efficiently and effectively using Elasticsearch.
- Fifth Edition
- Fifth Edition
- Contributors
- About the author
- About the reviewers
- Preface
- Who this book is for
- What this book covers
- To get the most out of this book
- Download the example code files
- Download the color images
- Conventions used
- Sections
- Getting ready
- How to do it
- How it works
- Theres more
- See also
- Get in touch
- Share Your Thoughts
- Chapter 1: Getting Started
- Technical requirements
- Downloading and installing Elasticsearch
- Getting ready
- How to do it
- How it works
- There's more
- See also
- Setting up networking
- Getting ready
- How to do it
- How it works
- See also
- Setting up a node
- Getting ready
- How to do it
- How it works
- See also
- Setting up Linux systems
- Getting ready
- How to do it
- How it works
- There's more
- Setting up different node roles
- Getting ready
- How to do it
- How it works
- There's more
- See also
- Setting up a coordinating-only node
- Getting ready
- How to do it
- How it works
- Setting up an ingestion node
- Getting ready
- How to do it
- How it works
- There's more
- Installing plugins in Elasticsearch
- Getting ready
- How to do it
- How it works
- There's more
- See also
- Removing a plugin
- Getting ready
- How to do it
- How it works
- Changing logging settings
- Getting ready
- How to do it
- How it works
- Setting up a node via Docker
- Getting ready
- How to do it
- How it works
- There's more
- See also
- Deploying on Elastic Cloud Enterprise
- Getting ready
- How to do it
- How it works
- See also
- Chapter 2: Managing Mappings
- Technical requirements
- Using explicit mapping creation
- Getting ready
- How to do it
- How it works
- There's more
- See also
- Mapping base types
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- Mapping arrays
- Getting ready
- How to do it
- How it works
- Mapping an object
- Getting ready
- How to do it
- How it works
- See also
- Mapping a document
- Getting ready
- How to do it
- How it works
- See also
- Using dynamic templates in document mapping
- Getting ready
- How to do it
- How it works
- There's more...
- See also
- Managing nested objects
- Getting ready
- How to do it
- How it works
- There's more...
- See also
- Managing a child document with a join field
- Getting ready
- How to do it
- How it works
- There's more...
- See also
- Adding a field with multiple mappings
- Getting ready
- How to do it
- How it works
- There's more...
- See also
- Mapping a GeoPoint field
- Getting ready
- How to do it
- How it works
- There's more...
- Mapping a GeoShape field
- Getting ready
- How to do it
- How it works
- See also
- Mapping an IP field
- Getting ready
- How to do it
- How it works
- Mapping an Alias field
- Getting ready
- How to do it...
- How it works
- Mapping a Percolator field
- Getting ready
- How to do it...
- How it works
- Mapping the Rank Feature and Feature Vector fields
- Getting ready
- How to do it
- How it works
- Mapping the Search as you type field
- Getting ready
- How to do it
- How it works
- See also
- Using the Range Fields type
- Getting ready
- How to do it...
- How it works
- See also
- Using the Flattened field type
- Getting ready
- How to do it
- How it works
- See also
- Using the Point and Shape field types
- Getting ready
- How to do it
- How it works
- See also
- Using the Dense Vector field type
- Getting ready
- How to do it
- How it works...
- Using the Histogram field type
- Getting ready
- How to do it
- How it works
- See also
- Adding metadata to a mapping
- Getting ready
- How to do it
- How it works
- Specifying different analyzers
- Getting ready
- How to do it
- How it works
- See also
- Using index components and templates
- Getting ready
- How to do it
- How it works
- See also
- Chapter 3: Basic Operations
- Technical requirements
- Creating an index
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- Deleting an index
- Getting ready
- How to do it...
- How it works...
- See also
- Opening or closing an index
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- Putting a mapping in an index
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- Getting a mapping
- Getting ready
- How to do it...
- How it works...
- See also
- Reindexing an index
- Getting ready
- How to do it...
- How it works...
- See also
- Refreshing an index
- Getting ready
- How to do it...
- How it works...
- See also
- Flushing an index
- Getting ready
- How to do it...
- How it works...
- See also
- Using ForceMerge on an index
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- Shrinking an index
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- Checking whether an index exists
- Getting ready
- How to do it...
- How it works...
- Managing index settings
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- Using index aliases
- Getting ready
- How to do it...
- How it works...
- There's more...
- Managing dangling indices
- Getting ready
- How to do it
- How it works...
- See also
- Resolving index names
- Getting ready
- How to do it
- How it works...
- See also
- Rolling over an index
- Getting ready
- How to do it
- How it works...
- There's more...
- See also
- Indexing a document
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- Getting a document
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- Deleting a document
- Getting ready
- How to do it...
- How it works...
- See also
- Updating a document
- Getting ready
- How to do it...
- How it works...
- See also
- Speeding up atomic operations (bulk operations)
- Getting ready
- How to do it...
- How it works...
- Speeding up GET operations (multi-GET)
- Getting ready
- How to do it...
- How it works...
- See also...
- Chapter 4: Exploring Search Capabilities
- Technical requirements
- Executing a search
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- Sorting results
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- Highlighting results
- Getting ready
- How to do it...
- How it works...
- See also
- Executing a scrolling query
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- Using the search_after functionality
- Getting ready
- How to do it
- How it works...
- See also
- Returning inner hits in results
- Getting ready
- How to do it...
- How it works...
- See also
- Suggesting a correct query
- Getting ready
- How to do it...
- How it works...
- See also
- Counting matched results
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- Explaining a query
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- Query profiling
- Getting ready
- How to do it...
- How it works...
- Deleting by query
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- Updating by query
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- Matching all of the documents
- Getting ready
- How to do it...
- How it works...
- See also
- Using a Boolean query
- Getting ready
- How to do it...
- How it works...
- There's more...
- Using the search template
- Getting ready
- How to do it...
- How it works...
- See also
- Chapter 5: Text and Numeric Queries
- Technical requirements
- Using a term query
- Getting ready
- How to do it...
- How it works...
- There's more...
- Using a terms query
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- Using a terms set query
- Getting ready
- How to do it...
- How it works...
- See also
- Using a prefix query
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- Using a wildcard query
- Getting ready
- How to do it...
- How it works...
- See also
- Using a regexp query
- Getting ready
- How to do it...
- How it works...
- See also
- Using span queries
- Getting ready
- How to do it...
- How it works...
- See also
- Using a match query
- Getting ready
- How to do it...
- How it works...
- See also
- Using a query string query
- Getting ready
- How to do it...
- How it works...
- There's more
- See also
- Using a simple query string query
- Getting ready
- How to do it...
- How it works...
- See also
- Using the range query
- Getting ready
- How to do it...
- How it works...
- There's more...
- Using an IDs query
- Getting ready
- How to do it...
- How it works...
- See also
- Using the function score query
- Getting ready
- How to do it...
- How it works...
- See also
- Using the exists query
- Getting ready
- How to do it...
- How it works...
- See also
- Using a pinned query (XPACK)
- Getting ready
- How to do it...
- How it works...
- See also
- Chapter 6: Relationships and Geo Queries
- Technical requirements
- Using the has_child query
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- Using the has_parent query
- Getting ready
- How to do it...
- How it works...
- See also
- Using the nested query
- Getting ready
- How to do it...
- How it works...
- See also
- Using the geo_bounding_box query
- Getting ready
- How to do it...
- How it works...
- See also
- Using the geo_shape query
- Getting ready
- How to do it...
- How it works...
- See also
- Using the geo_distance query
- Getting ready
- How to do it...
- How it works...
- See also
- Chapter 7: Aggregations
- Executing an aggregation
- Getting ready
- How to do it...
- How it works...
- See also
- Executing a stats aggregation
- Getting ready
- How to do it...
- How it works...
- See also
- Executing a terms aggregation
- Getting ready
- How to do it...
- How it works...
- Theres more...
- See also
- Executing a significant terms aggregation
- Getting ready
- How to do it...
- How it works...
- Executing a range aggregation
- Getting ready
- How to do it...
- How it works...
- Theres more...
- See also
- Executing a histogram aggregation
- Getting ready
- How to do it...
- How it works...
- Theres more...
- See also
- Executing a date histogram aggregation
- Getting ready
- How to do it...
- How it works...
- Theres more...
- See also
- Executing a filter aggregation
- Getting ready
- How to do it...
- How it works...
- Theres more...
- See also
- Executing a filters aggregation
- Getting ready
- How to do it...
- How it works...
- Executing a global aggregation
- Getting ready
- How to do it...
- How it works...
- Executing a geo distance aggregation
- Getting ready
- How to do it...
- How it works...
- See also
- Executing a children aggregation
- Getting ready
- How to do it...
- How it works...
- Executing a nested aggregation
- Getting ready
- How to do it...
- How it works...
- Theres more...
- Executing a top hit aggregation
- Getting ready
- How to do it...
- How it works...
- See also
- Executing a matrix stats aggregation
- Getting ready
- How to do it...
- How it works...
- Executing a geo bounds aggregation
- Getting ready
- How to do it...
- How it works...
- See also
- Executing a geo centroid aggregation
- Getting ready
- How to do it...
- How it works...
- See also
- Executing a geotile grid aggregation
- Getting ready
- How to do it...
- How it works...
- See also
- Executing a sampler aggregation
- Getting ready
- How to do it...
- How it works...
- Executing a pipeline aggregation
- Getting ready
- How to do it...
- How it works...
- See also
- Executing an aggregation
- Chapter 8: Scripting in Elasticsearch
- Painless scripting
- Getting ready
- How to do it...
- How it works...
- Theres more...
- See also
- Installing additional scripting languages
- Getting ready
- How to do it...
- How it works...
- Theres more...
- Managing scripts
- Getting ready
- How to do it...
- How it works...
- Theres more...
- See also
- Sorting data using scripts
- Getting ready
- How to do it...
- How it works...
- Theres more...
- Computing return fields with scripting
- Getting ready
- How to do it...
- How it works...
- See also
- Filtering a search using scripting
- Getting ready
- How to do it...
- How it works...
- See also
- Using scripting in aggregations
- Getting ready
- How to do it...
- How it works...
- Updating a document using scripts
- Getting ready
- How to do it...
- How it works...
- Theres more...
- Reindexing with a script
- Getting ready
- How to do it...
- How it works...
- Scripting in ingest processors
- Getting ready
- How to do it...
- How it works...
- See also
- Painless scripting
- Chapter 9: Managing Clusters
- Controlling the cluster health using the health API
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- Controlling the cluster state using the API
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- Getting cluster node information using the API
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- Getting node statistics using the API
- Getting ready
- How to do it...
- How it works...
- There's more...
- Using the task management API
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- Using the hot threads API
- Getting ready
- How to do it...
- How it works...
- Managing the shard allocation
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- Monitoring segments with the segment API
- Getting ready
- How to do it...
- How it works...
- See also
- Cleaning the cache
- Getting ready
- How to do it...
- How it works...
- Controlling the cluster health using the health API
- Chapter 10: Backups and Restoring Data
- Managing repositories
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- Executing a snapshot
- Getting ready
- How to do it...
- How it works...
- There's more...
- Restoring a snapshot
- Getting ready
- How to do it...
- How it works...
- Setting up an NFS share for backups
- Getting ready
- How to do it...
- How it works...
- Reindexing from a remote cluster
- Getting ready
- How to do it...
- How it works...
- See also
- Managing repositories
- Chapter 11: User Interfaces
- Installing Kibana
- Getting ready
- How to do it...
- How it works...
- See also
- Managing Kibana Discover
- Getting ready
- How to do it...
- How it works...
- Visualizing data with Kibana
- Getting ready
- How to do it...
- How it works...
- Using Kibana Dev Tools
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- Installing Kibana
- Chapter 12: Using the Ingest Module
- Pipeline definition
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- Inserting an ingest pipeline
- Getting ready
- How to do it...
- How it works...
- Getting an ingest pipeline
- Getting ready
- How to do it...
- How it works...
- There's more...
- Deleting an ingest pipeline
- Getting ready
- How to do it...
- How it works...
- Simulating an ingest pipeline
- Getting ready
- How to do it...
- How it works...
- There's more...
- Built-in processors
- Getting ready
- How to do it...
- How it works...
- See also
- The grok processor
- Getting ready
- How to do it...
- How it works...
- See also
- Using the ingest attachment plugin
- Getting ready
- How to do it...
- How it works...
- Using the ingest GeoIP processor
- Getting ready
- How to do it...
- How it works...
- See also
- Using the enrichment processor
- Getting ready
- How to do it...
- How it works...
- See also
- Pipeline definition
- Chapter 13: Java Integration
- Creating a standard Java HTTP client
- Getting ready
- How to do it...
- How it works...
- See also
- Creating a low-level Elasticsearch client
- Getting ready
- How to do it...
- How it works...
- See also
- Using the Elasticsearch official Java client
- Getting ready
- How to do it...
- How it works...
- See also
- Managing indices
- Getting ready
- How to do it...
- How it works...
- See also
- Managing mappings
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- Managing documents
- Getting ready
- How to do it...
- How it works...
- See also
- Managing bulk actions
- Getting ready
- How to do it...
- How it works...
- Building a query
- Getting ready
- How to do it...
- How it works...
- There's more...
- Executing a standard search
- Getting ready
- How to do it...
- How it works...
- See also
- Executing a search with aggregations
- Getting ready
- How to do it...
- How it works...
- See also
- Executing a scroll search
- Getting ready
- How to do it...
- How it works...
- See also
- Integrating with DeepLearning4j
- Getting ready
- How to do it...
- How it works...
- See also
- Creating a standard Java HTTP client
- Chapter 14: Scala Integration
- Creating a client in Scala
- Getting ready
- How to do it
- How it works...
- See also
- Managing indices
- Getting ready
- How to do it...
- How it works...
- See also
- Managing mappings
- Getting ready
- How to do it...
- How it works...
- See also
- Managing documents
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- Executing a standard search
- Getting ready
- How to do it...
- How it works...
- See also
- Executing a search with aggregations
- Getting ready
- How to do it...
- How it works...
- See also
- Integrating with DeepLearning.scala
- Getting ready
- How to do it...
- How it works...
- See also
- Creating a client in Scala
- Chapter 15: Python Integration
- Creating a client
- Getting ready
- How to do it...
- How it works
- See also
- Managing indices
- Getting ready
- How to do it
- How it works
- There's more
- See also
- Managing mappings
- Getting ready
- How to do it
- How it works
- See also
- Managing documents
- Getting ready
- How to do it
- How it works
- See also
- Executing a standard search
- Getting ready
- How to do it
- How it works
- See also
- Executing a search with aggregations
- Getting ready
- How to do it
- How it works
- See also
- Integrating with NumPy and scikit-learn
- Getting ready
- How to do it...
- How it works...
- See also
- Using AsyncElasticsearch
- Getting ready
- How to do it...
- How it works...
- See also
- Using Elasticsearch with FastAPI
- Getting ready
- How to do it...
- How it works...
- See also
- Creating a client
- Chapter 16: Plugin Development
- Creating a plugin
- Getting ready
- How to do it...
- How it works...
- There's more...
- Creating an analyzer plugin
- Getting ready
- How to do it...
- How it works...
- There's more...
- Creating a REST plugin
- Getting ready
- How to do it...
- How it works...
- See also
- Creating a cluster action
- Getting ready
- How to do it...
- How it works...
- See also
- Creating an ingest plugin
- Getting ready
- How to do it...
- How it works...
- See also
- Creating a plugin
- Chapter 17: Big Data Integration
- Installing Apache Spark
- Getting ready
- How to do it...
- How it works...
- There's more...
- Indexing data using Apache Spark
- Getting ready
- How to do it...
- How it works...
- See also
- Indexing data with meta using Apache Spark
- Getting ready
- How to do it...
- How it works...
- There's more...
- Reading data with Apache Spark
- Getting ready
- How to do it...
- How it works...
- Reading data using Spark SQL
- Getting ready
- How to do it...
- How it works...
- Indexing data with Apache Pig
- Getting ready
- How to do it...
- How it works...
- Using Elasticsearch with Alpakka
- Getting ready
- How to do it...
- How it works...
- See also
- Using Elasticsearch with MongoDB
- Getting ready
- How to do it...
- How it works...
- See also
- Installing Apache Spark
- Chapter 18: X-Pack
- ILM managing the index life cycle
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- ILM automating rollover
- Getting ready
- How to do it...
- How it works...
- There's more...
- See also
- Using the SQL Rest API
- Getting ready
- How to do it
- How it works...
- There's more...
- See also
- Using SQL via JDBC
- Getting ready
- How to do it
- How it works...
- See also
- Using X-Pack Security
- Getting ready
- How to do it
- How it works...
- See also
- Using alerting to monitor data events
- Getting ready
- How to do it
- How it works...
- See also
- Why subscribe?
- ILM managing the index life cycle
- Other Books You May Enjoy
- Packt is searching for authors like you
- Share Your Thoughts
- Tytuły: Elasticsearch 8.x Cookbook - Fifth Edition
- Autor: Alberto Paro
- Tytuł oryginału: Elasticsearch 8.x Cookbook - Fifth Edition
- ISBN Ebooka: 9781801072885, 9781801072885
- Data wydania: 2022-05-27
- Identyfikator pozycji: e_2t5t
- Kategorie:
- Wydawca: Packt Publishing