0
0
Elasticsearchquery~20 mins

Standard analyzer in Elasticsearch - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Standard Analyzer Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Predict Output
intermediate
2:00remaining
What is the output of the standard analyzer on the text?
Given the text "The Quick Brown Foxes jumped over the lazy dogs.", what tokens does the standard analyzer produce?
Elasticsearch
{
  "analyze": {
    "analyzer": "standard",
    "text": "The Quick Brown Foxes jumped over the lazy dogs."
  }
}
A["the", "quick", "brown", "fox", "jumped", "over", "the", "lazy", "dog"]
B["The", "Quick", "Brown", "Foxes", "jumped", "over", "the", "lazy", "dogs"]
C["the", "quick", "brown", "foxes", "jumped", "over", "lazy", "dogs"]
D["the", "quick", "brown", "foxes", "jumped", "over", "the", "lazy", "dogs"]
Attempts:
2 left
💡 Hint
The standard analyzer lowercases all tokens and splits on punctuation and whitespace.
🧠 Conceptual
intermediate
1:30remaining
Which feature is NOT part of the standard analyzer?
Select the feature that the standard analyzer does NOT perform on input text.
ARemoving English stop words by default
BLowercasing all tokens
CSplitting text on punctuation and whitespace
DTokenizing text into terms
Attempts:
2 left
💡 Hint
Think about whether the standard analyzer removes common words like "the" or "and".
🔧 Debug
advanced
2:00remaining
Why does this standard analyzer output include the token "can't" split into two tokens?
Given the text "I can't do this." analyzed with the standard analyzer, the output tokens are ["i", "can't", "do", "this"]. Why is "can't" not split into "can" and "t"?
Elasticsearch
{
  "analyze": {
    "analyzer": "standard",
    "text": "I can't do this."
  }
}
AThe standard analyzer treats apostrophes inside words as part of the token.
BThe standard analyzer removes apostrophes, so "can't" becomes "cant".
CThe standard analyzer splits tokens on apostrophes, so "can't" becomes "can" and "t".
DThe standard analyzer converts contractions into full words automatically.
Attempts:
2 left
💡 Hint
Consider how the standard analyzer treats punctuation inside words.
📝 Syntax
advanced
1:30remaining
What error occurs with this standard analyzer JSON request?
Identify the error in this JSON request to analyze text with the standard analyzer:
{
  "analyze": {
    "analyzer": "standard",
    "text": ["Hello", "world"]
  }
}
ANo error, the request is valid and returns tokens for both words
BRuntimeError: Analyzer 'standard' does not support arrays
CTypeError: 'text' field must be a string, not an array
DSyntaxError: JSON array not allowed for 'text' field
Attempts:
2 left
💡 Hint
Check the expected data type for the 'text' field in the analyze API.
🚀 Application
expert
2:30remaining
How many tokens does the standard analyzer produce for this text?
Analyze the text "E-mail addresses like test@example.com are tokenized." with the standard analyzer. How many tokens are produced?
Elasticsearch
{
  "analyze": {
    "analyzer": "standard",
    "text": "E-mail addresses like test@example.com are tokenized."
  }
}
A7
B8
C9
D6
Attempts:
2 left
💡 Hint
The standard analyzer keeps hyphenated words like 'E-mail' as a single token but splits emails on punctuation like @ and ..