Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying ElasticSearch Cookbook - Second Edition
  • Table Of Contents Toc
  • Feedback & Rating feedback
ElasticSearch Cookbook - Second Edition

ElasticSearch Cookbook - Second Edition - Second Edition

By : Alberto Paro
4.1 (7)
close
close
ElasticSearch Cookbook - Second Edition

ElasticSearch Cookbook - Second Edition

4.1 (7)
By: Alberto Paro

Overview of this book

If you are a developer who implements ElasticSearch in your web applications and want to sharpen your understanding of the core elements and applications, this is the book for you. It is assumed that you’ve got working knowledge of JSON and, if you want to extend ElasticSearch, of Java and related technologies.
Table of Contents (14 chapters)
close
close
13
Index

Opening/closing an index


If you want to keep your data but save resources (memory/CPU), a good alternative to deleting an Index is to close it.

ElasticSearch allows you to open or close an index to put it in online/offline mode.

Getting ready

You will need a working ElasticSearch cluster and the index created in the Creating an index recipe in this chapter.

How to do it...

For opening/closing an index, we will perform the following steps:

  1. From the command line, we can execute a POST call to close an index:

    curl -XPOST http://127.0.0.1:9200/myindex/_close
    
  2. If the call is successful, the result returned by ElasticSearch should be:

    {,"acknowledged":true}
  3. To open an index from the command line, enter:

    curl -XPOST http://127.0.0.1:9200/myindex/_open
    
  4. If the call is successful, the result returned by ElasticSearch should be:

    {"acknowledged":true}

How it works...

When an index is closed, there is no overhead on the cluster (except for the metadata state); the index shards are turned off and don't use file descriptors...

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
ElasticSearch Cookbook - Second Edition
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon