Bird
0
0

If an Elasticsearch mapping defines a field "tags" as "type": "keyword", what will be the behavior when searching for partial matches on "tags" values?

medium📝 query result Q5 of 15
Elasticsearch - Index Management
If an Elasticsearch mapping defines a field "tags" as "type": "keyword", what will be the behavior when searching for partial matches on "tags" values?
APartial matches will not work because keyword fields are not analyzed
BPartial matches will work only if the field is numeric
CPartial matches will work because keyword fields are analyzed
DPartial matches will work only if the field is a date
Step-by-Step Solution
Solution:
  1. Step 1: Understand keyword field behavior

    Keyword fields are not analyzed, so they store exact values.
  2. Step 2: Effect on partial matching

    Because they are not analyzed, partial matches do not work on keyword fields.
  3. Final Answer:

    Partial matches will not work because keyword fields are not analyzed -> Option A
  4. Quick Check:

    Keyword fields = no partial match [OK]
Quick Trick: Keyword fields store exact values, no partial search [OK]
Common Mistakes:
MISTAKES
  • Assuming keyword fields are analyzed
  • Confusing keyword with text
  • Thinking numeric or date affects partial match

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes