Elasticsearch - Mappings and Data TypesWhy does Elasticsearch store binary fields as base64 encoded strings instead of raw bytes?ABecause binary fields are faster to search when encodedBBecause JSON only supports text, so binary data must be encodedCBecause base64 reduces the size of the dataDBecause Elasticsearch does not support binary data at allCheck Answer
Step-by-Step SolutionSolution:Step 1: Understand JSON data formatElasticsearch uses JSON which supports text, not raw binary bytes.Step 2: Reason why base64 encoding is usedBase64 encodes binary data into text so it can be safely stored and transferred in JSON.Final Answer:Because JSON only supports text, so binary data must be encoded -> Option BQuick Check:Binary stored as base64 due to JSON text limitation [OK]Quick Trick: Binary data is base64 encoded because JSON supports text only [OK]Common Mistakes:MISTAKESThinking base64 reduces data sizeAssuming Elasticsearch can't store binaryBelieving encoding improves search speed
Master "Mappings and Data Types" in Elasticsearch9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More Elasticsearch Quizzes Basic Search Queries - Exists query - Quiz 4medium Document Operations - Document ID strategies (auto vs manual) - Quiz 12easy Elasticsearch Basics and Architecture - Why Elasticsearch exists - Quiz 7medium Elasticsearch Basics and Architecture - First search query - Quiz 2easy Elasticsearch Basics and Architecture - Why Elasticsearch exists - Quiz 9hard Index Management - Index lifecycle management - Quiz 9hard Index Management - Index settings (shards, replicas) - Quiz 7medium Index Management - Why indexes organize data - Quiz 13medium Mappings and Data Types - Date field types - Quiz 5medium Mappings and Data Types - Geo-point and geo-shape types - Quiz 6medium