The Standard analyzer is the default text analyzer in Elasticsearch. It breaks text into terms on word boundaries, removes most punctuation, and lowercases the terms to make searching easier and more consistent.
Click to reveal answer
beginner
Which tokenizer does the Standard analyzer use?
The Standard analyzer uses the Standard tokenizer, which splits text into terms based on word boundaries using the Unicode Text Segmentation algorithm.
Click to reveal answer
beginner
What filters are applied by default in the Standard analyzer?
By default, the Standard analyzer applies the Lowercase filter to convert all terms to lowercase, helping with case-insensitive search.
Click to reveal answer
intermediate
How does the Standard analyzer handle punctuation in text?
The Standard analyzer removes most punctuation characters during tokenization, so terms are clean words without punctuation marks.
Click to reveal answer
intermediate
Why is the Standard analyzer suitable for general-purpose text analysis?
Because it splits text into words, lowercases them, and removes punctuation, it works well for many languages and common search needs without extra configuration.
Click to reveal answer
What is the default tokenizer used by the Standard analyzer?
APattern tokenizer
BWhitespace tokenizer
CKeyword tokenizer
DStandard tokenizer
✗ Incorrect
The Standard analyzer uses the Standard tokenizer by default, which splits text on word boundaries.
Which filter does the Standard analyzer apply by default?
ALowercase filter
BSynonym filter
CStemmer filter
DStop filter
✗ Incorrect
The Standard analyzer applies the Lowercase filter to convert all tokens to lowercase.
How does the Standard analyzer treat punctuation marks?
AConverts punctuation to spaces
BKeeps all punctuation as separate tokens
CRemoves most punctuation during tokenization
DIgnores punctuation only at the start of words
✗ Incorrect
The Standard analyzer removes most punctuation characters during tokenization.
Why is the Standard analyzer often used as the default analyzer?
AIt requires no configuration and works well for many languages
BIt supports only English language
CIt indexes raw text without tokenizing
DIt applies complex stemming rules
✗ Incorrect
The Standard analyzer works well for many languages and general text without extra setup.
Which of these is NOT a feature of the Standard analyzer?
ATokenizes text on word boundaries
BApplies synonym expansion by default
CConverts tokens to lowercase
DRemoves most punctuation
✗ Incorrect
The Standard analyzer does not apply synonym expansion by default.
Explain how the Standard analyzer processes text from input to tokens.
Think about tokenizing, cleaning, and normalizing text.
You got /3 concepts.
Why might you choose the Standard analyzer for a new Elasticsearch index?
Consider ease of use and broad applicability.
You got /4 concepts.
Practice
(1/5)
1. What does the standard analyzer in Elasticsearch do by default?
easy
A. Keeps punctuation and case intact
B. Breaks text into words, ignores punctuation and case
C. Only analyzes numbers and symbols
D. Removes all spaces and joins words
Solution
Step 1: Understand the role of the standard analyzer
The standard analyzer splits text into simple words by removing punctuation and ignoring case differences.
Step 2: Recall default behavior in Elasticsearch
It is the default analyzer and is designed for general text processing, making text lowercase and splitting on punctuation.
Final Answer:
Breaks text into words, ignores punctuation and case -> Option B
Quick Check:
Standard analyzer = splits words, ignores punctuation and case [OK]
Hint: Standard analyzer splits words and lowercases text [OK]
Common Mistakes:
Thinking it keeps punctuation
Assuming it preserves case
Believing it only analyzes numbers
2. Which of the following is the correct way to specify the standard analyzer in an Elasticsearch index mapping?
easy
A. "analyzer": "whitespace"
B. "analyzer": "simple"
C. "analyzer": "keyword"
D. "analyzer": "standard"
Solution
Step 1: Identify the analyzer name for standard analyzer
The standard analyzer is referenced by the string "standard" in Elasticsearch mappings.
Step 2: Compare with other analyzer names
Other analyzers like "simple", "keyword", and "whitespace" are different and not the standard analyzer.
Final Answer:
"analyzer": "standard" -> Option D
Quick Check:
Standard analyzer name = "standard" [OK]
Hint: Use "analyzer": "standard" to apply standard analyzer [OK]
Common Mistakes:
Using other analyzer names by mistake
Forgetting quotes around analyzer name
Confusing standard with simple analyzer
3. Given the text "Hello, World! Elasticsearch 7.10", what tokens will the standard analyzer produce?
medium
A. ["Hello", "World", "Elasticsearch", "7.10"]
B. ["hello,", "world!", "elasticsearch", "7.10"]
C. ["hello", "world", "elasticsearch", "7", "10"]
D. ["hello world elasticsearch 7 10"]
Solution
Step 1: Apply standard analyzer tokenization rules
The standard analyzer lowercases text and splits on punctuation and whitespace, so "Hello," becomes "hello", "World!" becomes "world".
Step 2: Analyze numbers and punctuation
Numbers separated by punctuation like "7.10" are split into "7" and "10" tokens.
Final Answer:
["hello", "world", "elasticsearch", "7", "10"] -> Option C
Quick Check:
Standard analyzer tokens = lowercase words split on punctuation [OK]
Hint: Standard analyzer lowercases and splits on punctuation [OK]
Common Mistakes:
Keeping punctuation attached to words
Not splitting numbers on dots
Preserving original case
4. You wrote this mapping snippet but your field is not analyzed as expected:
A. Analyzer name should be "standard", not "standard_analyzer"
B. Field type should be "keyword" instead of "text"
C. Analyzer must be defined under "settings", not "mappings"
D. Missing "index": true property
Solution
Step 1: Check the analyzer name used in mapping
The standard analyzer is named "standard". Using "standard_analyzer" is incorrect and causes the analyzer to not be found.
Step 2: Verify field type and analyzer placement
Field type "text" is correct for analyzed fields, and analyzer is correctly placed under "mappings". "index": true is default and not required.
Final Answer:
Analyzer name should be "standard", not "standard_analyzer" -> Option A
Quick Check:
Analyzer name must be exact "standard" [OK]
Hint: Use exact analyzer name "standard" in mappings [OK]
Common Mistakes:
Adding extra suffix to analyzer name
Changing field type to keyword for analyzed text
Misplacing analyzer in settings instead of mappings
5. You want to create a custom analyzer that uses the standard tokenizer but adds a lowercase filter and a stop word filter. Which of the following JSON snippets correctly defines this analyzer in Elasticsearch?