ek9_ask
Returns the best-matching curated Q&A entries: 'match: strong|weak|id' first, then per entry the id, question, category, Oracle tool, the answer and last the compiled EK9 example (capped by default).
When to use it
'How do I ... in EK9' or 'why does EK9 ...' is one call with query:'<the question>' - the curated, compiled Q&A corpus, no workspace needed. Pass the question as free text, or 'Q1043' to fetch one entry by id; the corpus covers idioms, rationale and migration.
When not to use it
- A type's methods and operators or one keyword's page ('what does String offer') - use
ek9_help. - A specific error code (E07235, E08100) - use
ek9_explain_error. - Priming a fresh AI session with the EK9 paradigm - use
ek9_paradigm. - A construct in THIS workspace rather than the corpus - use
ek9_query_construct/ek9_query_workspace/ek9_query_effective_api; for a workspace error,ek9_query_diagnostics.
Details
Plain text. verbosity: 'summary' (default for a free-text search) = the answer's opening paragraph and the first 15 lines of the example; 'full' (default for a Q<id> fetch) = the whole answer, the whole example and its companion sources; 'none' = only the headline lines (id, question, category, Oracle tool). includeMigration:true appends each entry's cross-language migration note where one exists (entries without one are not filtered out). match: 'strong' when at least half of the query's content words appear in the matched question, else 'weak' with a hint; 'id' for a Q<id> fetch. maxResults caps entries (default 3). Static corpus, independent of workspace compile state; a no-match is a successful empty result.
Arguments
| Argument | Type | Required | What it is |
|---|---|---|---|
includeMigration | boolean | Append each entry's cross-language migration note where one exists (default false). | |
maxResults | integer | Maximum entries returned (default 3) | |
mode | string: summary | detailed | migration | Retained alias: 'summary' = verbosity:'summary', 'detailed' = verbosity:'full', 'migration' = includeMigration:true. Prefer the two parameters it expands to. | |
query | string | yes | The question in natural language, or an entry id ('Q1043', '1043') |
verbosity | string: full | summary | none | Response size: 'summary' (default for a search) = opening answer paragraph + first 15 example lines; 'full' (default for a Q<id> fetch) = whole answer, whole example, companion sources; 'none' = headline lines only. |
See also
- Show me in the IDE: Chapter 9: collections, asked about