[{"id":"elasticsearchadvanced-001","courseId":"elasticsearch-advanced","domain":"data-modeling","topic":"Dense vector fields","prompt":"You run Elastic Stack 9.0 and map a float dense_vector field without setting index_options. Which index type does Elasticsearch choose for it?","hint":"The default depends on the element type, and it can change between releases.","explain":"A dense vector field gets an indexing strategy when you do not name one. That strategy can depend on the element type and the release, and some strategies store compressed values to save memory.","source":"https://www.elastic.co/guide/en/elasticsearch/reference/current/dense-vector.html","interaction":{"type":"single"},"options":[{"id":"a","text":"int8_hnsw","why":"On Elastic Stack 9.0, float dense_vector fields are always indexed as int8_hnsw, so no index_options is needed."},{"id":"b","text":"hnsw with no quantization","whyNot":"That is the default for byte and bit vectors; float vectors on 9.0 get int8_hnsw instead."},{"id":"c","text":"bbq_disk","whyNot":"bbq_disk is a quantization you request in index_options; it is not the automatic choice for float vectors."},{"id":"d","text":"No index, so queries scan every vector","whyNot":"Indexing is enabled by default for dense vector fields, so Elasticsearch does not fall back to scanning."}],"answer":"a","explanation":"On Elastic Stack 9.0, float dense_vector fields are always indexed as int8_hnsw; for byte and bit vectors the default is hnsw with no quantization.","concept":"On Elastic Stack 9.0, float dense_vector fields are always indexed as int8_hnsw; for byte and bit vectors the default is hnsw with no quantization.","rev":1,"updatedAt":"2026-10-26","kind":"scenario","takeaways":["Default vector index types depend on element type and release, so check your version before tuning index_options."]},{"id":"elasticsearchadvanced-002","courseId":"elasticsearch-advanced","domain":"data-modeling","topic":"Index sorting","prompt":"On an index sorted by a multi-valued field in ascending order, with no index.sort.mode set, each document is ordered by its smallest value for that field.","hint":"Look at what the setting that picks one value per document defaults to.","explain":"A field can hold several values, so a sort needs one value per document to compare. A setting chooses that value, and its default depends on how the sort is set.","source":"https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-index-sorting.html","interaction":{"type":"true-false"},"options":[{"id":"a","text":"True","why":"With ascending order, index.sort.mode defaults to min, so the smallest value is the one picked."},{"id":"b","text":"False","whyNot":"Wrong: ascending order defaults to min, the lowest value. Max is the default only when the order is descending."}],"answer":"a","explanation":"For ascending order, index.sort.mode defaults to min (lowest value); for descending order it defaults to max (highest value).","concept":"For ascending order, index.sort.mode defaults to min (lowest value); for descending order it defaults to max (highest value).","rev":1,"updatedAt":"2026-10-26","kind":"scenario","takeaways":["For multi-valued sort fields the default pick depends on sort direction; set index.sort.mode when you need another pick."]},{"id":"elasticsearchadvanced-003","courseId":"elasticsearch-advanced","domain":"data-modeling","topic":"semantic_text fields","prompt":"A semantic_text field sets inference_id to my-endpoint and leaves search_inference_id unset. Which endpoint embeds the query text when you search this field?","hint":"Check which settings the query side can override before assuming a default.","explain":"A semantic field can use separate embedding endpoints for indexing and for queries. Query vectors must be comparable with the stored chunks, so consider what happens when only one endpoint is named.","source":"https://www.elastic.co/guide/en/elasticsearch/reference/current/semantic-text.html","interaction":{"type":"single"},"options":[{"id":"a","text":"my-endpoint, the same endpoint used at index time","why":"With no search_inference_id, the inference_id endpoint is used at both index time and query time."},{"id":"b","text":"The default inference endpoint, because inference_id only covers indexing","whyNot":"inference_id also applies at query time when no search endpoint is given; the default is used only when inference_id is omitted."},{"id":"c","text":"No embedding; the query is matched as plain text against the chunks","whyNot":"The query is embedded with an endpoint, because the field exists for embedding-based search."},{"id":"d","text":"Whichever endpoint last indexed a document, chosen per request","whyNot":"Endpoints come from the field's mapping, not from whichever endpoint handled the last write."}],"answer":"a","explanation":"If search_inference_id is not set, the endpoint named in inference_id is used at both index time and query time.","concept":"If search_inference_id is not set, the endpoint named in inference_id is used at both index time and query time.","rev":1,"updatedAt":"2026-10-26","kind":"scenario","takeaways":["Set search_inference_id only when queries must be embedded with a different endpoint than indexing uses."]},{"id":"elasticsearchadvanced-004","courseId":"elasticsearch-advanced","domain":"data-modeling","topic":"Flattened fields","prompt":"A labels field is mapped as flattened and holds keys such as timestamp.created. Which TWO statements about searching or sorting that field are true?","hint":"Think about how the values inside the flattened field are typed.","explain":"A flattened field turns a whole object into one field whose leaf values share one handling rule. Think about what that rule means for numbers, for ordering, and for features that rely on marked-up text.","source":"https://www.elastic.co/guide/en/elasticsearch/reference/current/flattened.html","interaction":{"type":"multiple","tellCount":true},"options":[{"id":"a","text":"Sorting on the field compares values lexicographically, so 10 comes before 9.","why":"All values are treated as keywords, and sorting compares them as text, character by character."},{"id":"b","text":"Highlighting is not supported on flattened fields.","why":"The page states that highlighting is not supported on flattened fields."},{"id":"c","text":"A range query on a numeric key compares the values as numbers.","whyNot":"All queries, including range, treat flattened values as string keywords, so comparisons are textual."},{"id":"d","text":"A wildcard such as labels.time* can match several keys when fetching a subfield.","whyNot":"Fetching a subfield only works with concrete paths; wildcards cannot be used to name keys."},{"id":"e","text":"Each new key adds its own mapping entry to the index.","whyNot":"Only one field mapping is created for the whole JSON object, however many keys it has."},{"id":"f","text":"The store parameter can keep the whole object as its own stored field.","whyNot":"Flattened object fields cannot be stored, and the store parameter cannot be set on them."}],"answer":"ab","explanation":"Flattened fields index every leaf as a keyword: no numeric semantics, lexicographic sorting, and no highlighting.","concept":"Flattened fields index every leaf as a keyword: no numeric semantics, lexicographic sorting, and no highlighting.","rev":1,"updatedAt":"2026-10-26","kind":"scenario","takeaways":["Flattened fields trade numeric and highlight support for one mapping, regardless of how many keys an object has."]},{"id":"elasticsearchadvanced-005","courseId":"elasticsearch-advanced","domain":"data-modeling","topic":"Synthetic source","prompt":"Synthetic _source is enabled on an index. You index a document whose items field is an array: one object holds sku, another object holds qty. What does the retrieved _source show for items?","hint":"Think about what synthetic source rebuilds at read time and what it keeps as sent.","explain":"Synthetic source rebuilds a document from indexed data at read time, not from the text that was sent. Rebuilding can change the layout of repeated structures, so compare what goes in with what comes out.","source":"https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-source-field.html","interaction":{"type":"single"},"options":[{"id":"a","text":"One object holding both sku and qty","why":"Synthetic source moves array elements to leaf fields, so the two objects merge into one object."},{"id":"b","text":"The original two-element array, unchanged","whyNot":"Synthetic source rebuilds the document at read time, so the array shape is not kept."},{"id":"c","text":"Only the sku object, because the qty object is dropped","whyNot":"Nothing is discarded here; the qty key is merged into the same object as sku."},{"id":"d","text":"The original document, byte for byte, as it was sent","whyNot":"With synthetic _source the document is reconstructed on retrieval rather than returned as sent."}],"answer":"a","explanation":"With synthetic _source, array elements that are objects move to leaf fields, so separate objects can merge into one and the array can vanish.","concept":"With synthetic _source, array elements that are objects move to leaf fields, so separate objects can merge into one and the array can vanish.","rev":1,"updatedAt":"2026-10-26","kind":"scenario","takeaways":["Synthetic _source can reshape arrays and sort keys alphabetically, so do not rely on the returned layout."]}]