0
0
Elasticsearchquery~10 mins

Standard analyzer 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 define a standard analyzer in Elasticsearch.

Elasticsearch
{
  "settings": {
    "analysis": {
      "analyzer": {
        "my_standard_analyzer": {
          "type": "[1]"
        }
      }
    }
  }
}
Drag options to blanks, or click blank then click option'
Astandard
Bkeyword
Csimple
Dwhitespace
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'keyword' analyzer which does not tokenize the text.
Using 'simple' or 'whitespace' which behave differently.
2fill in blank
medium

Complete the code to create an index with a standard analyzer applied to a field.

Elasticsearch
{
  "mappings": {
    "properties": {
      "content": {
        "type": "text",
        "analyzer": "[1]"
      }
    }
  }
}
Drag options to blanks, or click blank then click option'
Akeyword
Bstandard
Csimple
Denglish
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'keyword' analyzer which does not tokenize text.
Using language-specific analyzers like 'english' when standard is needed.
3fill in blank
hard

Fix the error in the analyzer definition to use the standard analyzer correctly.

Elasticsearch
{
  "settings": {
    "analysis": {
      "analyzer": {
        "my_analyzer": {
          "type": "[1]"
        }
      }
    }
  }
}
Drag options to blanks, or click blank then click option'
Astandard
BStandard
CSTANDARD
Dstandards
Attempts:
3 left
💡 Hint
Common Mistakes
Using uppercase or capitalized versions like 'Standard' or 'STANDARD'.
Typo like 'standards' which is invalid.
4fill in blank
hard

Fill both blanks to define a custom analyzer using the standard tokenizer and lowercase filter.

Elasticsearch
{
  "settings": {
    "analysis": {
      "analyzer": {
        "custom_std_lower": {
          "tokenizer": "[1]",
          "filter": ["[2]"]
        }
      }
    }
  }
}
Drag options to blanks, or click blank then click option'
Astandard
Blowercase
Cstop
Dkeyword
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'keyword' tokenizer which does not split text.
Using 'stop' filter instead of 'lowercase' filter.
5fill in blank
hard

Fill all three blanks to create an index with a standard analyzer and a mapping that uses it on the 'title' field.

Elasticsearch
{
  "settings": {
    "analysis": {
      "analyzer": {
        "my_std_analyzer": {
          "type": "[1]"
        }
      }
    }
  },
  "mappings": {
    "properties": {
      "title": {
        "type": "text",
        "analyzer": "[2]"
      }
    }
  }
}
Drag options to blanks, or click blank then click option'
Akeyword
Bstandard
Cmy_std_analyzer
Dsimple
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'keyword' as analyzer type which does not tokenize.
Using 'standard' as analyzer name in mapping instead of custom analyzer name.