0
0
Elasticsearchquery~10 mins

Index refresh interval in Elasticsearch - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set the refresh interval to 1 second.

Elasticsearch
PUT /my_index/_settings
{
  "index": {
    "refresh_interval": "[1]"
  }
}
Drag options to blanks, or click blank then click option'
A"1s"
B"1000ms"
C"1sec"
D"one_second"
Attempts:
3 left
💡 Hint
Common Mistakes
Using invalid time units like "1sec" or words like "one_second".
Using milliseconds without quotes.
2fill in blank
medium

Complete the code to disable automatic refresh by setting refresh interval to -1.

Elasticsearch
PUT /my_index/_settings
{
  "index": {
    "refresh_interval": [1]
  }
}
Drag options to blanks, or click blank then click option'
A"-1s"
B"-1"
C-1
D"none"
Attempts:
3 left
💡 Hint
Common Mistakes
Using numeric -1 without quotes causes errors.
Using "-1s" which is invalid.
3fill in blank
hard

Fix the error in the code to correctly set refresh interval to 500 milliseconds.

Elasticsearch
PUT /my_index/_settings
{
  "index": {
    "refresh_interval": [1]
  }
}
Drag options to blanks, or click blank then click option'
A"500ms"
B500ms
C"0.5s"
D"500"
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting quotes around the value.
Using just "500" without units.
4fill in blank
hard

Fill both blanks to set refresh interval to 2 seconds and then verify it with a GET request.

Elasticsearch
PUT /my_index/_settings
{
  "index": {
    "refresh_interval": [1]
  }
}

GET /my_index/_settings
{
  "[2]": {}
}
Drag options to blanks, or click blank then click option'
A"2s"
B"refresh_interval"
C"settings"
D"index"
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong keys in GET request like "refresh_interval" instead of "settings".
Not quoting the refresh interval value.
5fill in blank
hard

Fill all three blanks to set refresh interval to 30 seconds, disable automatic refresh, and then reset it back to 1 second.

Elasticsearch
PUT /my_index/_settings
{
  "index": {
    "refresh_interval": [1]
  }
}

PUT /my_index/_settings
{
  "index": {
    "refresh_interval": [2]
  }
}

PUT /my_index/_settings
{
  "index": {
    "refresh_interval": [3]
  }
}
Drag options to blanks, or click blank then click option'
A"30s"
B"-1"
C"1s"
D"0s"
Attempts:
3 left
💡 Hint
Common Mistakes
Using numeric -1 instead of string "-1".
Using invalid time strings like "0s" to disable.