Skip to content

use tabify for regionmap#14364

Merged
thomasneirynck merged 2 commits into
elastic:masterfrom
thomasneirynck:fix/tabify_regionmap
Oct 10, 2017
Merged

use tabify for regionmap#14364
thomasneirynck merged 2 commits into
elastic:masterfrom
thomasneirynck:fix/tabify_regionmap

Conversation

@thomasneirynck
Copy link
Copy Markdown
Contributor

Use the tabify responseHandler in regionmaps

Similar to #14266.

@thomasneirynck thomasneirynck added Feature:Visualizations Generic visualization features (in case no more specific feature label is available) chore review v6.0.0 v6.1.0 v7.0.0 labels Oct 6, 2017
@ppisljar
Copy link
Copy Markdown
Contributor

ppisljar commented Oct 8, 2017

jenkins, test this

Copy link
Copy Markdown
Contributor

@ppisljar ppisljar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

} else {
const buckets = response.aggregations[termAggId].buckets;
const buckets = tableGroup.tables[0].rows;
results = buckets.map((bucket) => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider ([term, value]) => {


let results;
if (!response || !response.aggregations) {
if (!tableGroup || !tableGroup.tables || !tableGroup.tables.length) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a check that columns have length equal 2 ?

@thomasneirynck thomasneirynck merged commit 0175cac into elastic:master Oct 10, 2017
thomasneirynck added a commit to thomasneirynck/kibana that referenced this pull request Oct 10, 2017
thomasneirynck added a commit to thomasneirynck/kibana that referenced this pull request Oct 10, 2017
@thomasneirynck
Copy link
Copy Markdown
Contributor Author

thomasneirynck commented Oct 10, 2017

patrykkopycinski pushed a commit to patrykkopycinski/kibana that referenced this pull request May 6, 2026
Apmats added a commit to Apmats/kibana that referenced this pull request May 13, 2026
…lastic#14363)

Land the natural-language search API over SML, replacing the transitional
bool.should mash with a proper RRF retriever and introducing the
trust-boundary split between runtime-imposed scoping and
agent-discoverable filters.

Decisions per the implementation prompt §6:

- §6.1 Retrieval: RRF over BM25 (title^2, description, content via
  best_fields multi_match) and semantic (unified_semantic). Filters
  mirrored to each child retriever so RRF can't pull unauthorized docs
  into the fused top-k. Defaults rank_constant=60, rank_window_size=50.
- §6.2 Filter merging: option (2). Service signature splits
  `scoping?: SmlSearchScoping` (runtime-imposed, unconditional) from
  `filters?: SmlSearchFilters` (caller refinement). Trust boundary
  visible at the API layer; merge happens in one place. Sean's per-type
  id-allowlist shape (elastic#267333) survives unchanged as `SmlSearchScoping`.
- §6.3 Agent-supplied dimensions: `types?: string[]`, `tags?: string[]`,
  each lowering into a `terms` clause. Time-range and free-form payload
  filters deferred.
- §6.4 Compact LLM response: SmlSearchResult drops the `content` blob,
  full `payload`, dates, and discovery_labels; gains `more_content`
  (true when the indexed record has non-empty content worth fetching
  via sml_read). `permissions` retained internally for post-hoc
  filtering, stripped from the HTTP response.
- §6.5 Reference resolution: URI strings only — SML does not
  dereference. Inline-expansion deferred until eval data justifies it
  (Reading 1; Sean's "SML shouldn't turn pointers into blobs").
- §6.6 Tool description rewrite with when-to-use guidance and four
  worked examples (plain query, types+tags filter, connector
  restriction, wildcard inventory). Runtime scoping is not exposed in
  the LLM input schema.

Fixes the `total` bug: post-permission-filter `results.length` no
longer overwrites ES `hits.total.value`.

Frontend / HTTP route updates:
- POST /sml/_search body accepts `scoping?` and `filters?` (replaces
  the old `filters` per-type id-allowlist field and `skip_content`).
- POST /sml/_autocomplete renames `filters` → `scoping`; no
  agent-discoverable filters on this route (no LLM in the path).
- Frontend SmlService, useSmlSearch, useSmlAutocomplete, usePrefetchSml,
  queryKeys, and buildSmlScopingFromAgent (formerly
  buildSmlFiltersFromAgent) all follow the new naming.

Tests:
- New unit tests for RRF body, filter threading through child
  retrievers, vocabulary-mismatch over the semantic leg, more_content
  on/off, compact result mapping, agent-filter builder, and tool
  wrapper scoping/filters mapping.
- FTR + Scout integration tests updated to drop content/skip_content
  assertions and lock in the no-content invariant.

Out of scope (deferred per epic): reranker, kneedle, per-type
retriever profiles, HyDE/query expansion, reference inline-expansion,
telemetry instrumentation (elastic#14366), recrawl/versioning (elastic#14367).

Open coordination points (not blocking this PR):
- Inference model on unified_semantic still relies on defaults
  (Kathleen Mar 19: pin Jina V5). Belongs to A.
- Kathleen review on A's PR proposes splitting unified_semantic into
  per-field semantic_text fields. If A reverts unified, the semantic
  leg in this PR fans out from 1 to 2-3 child retrievers — small
  retriever-only change.
- Pierre's configuration_override-aware tool handler context
  (elastic#267333 review) — wrapper currently reads agentConfiguration from
  the tool handler context, which `runner.ts` already resolves with
  overrides applied via `resolveConfiguration`. Note in code.

Stacked on top of apmats/sml-autocomplete-followup (elastic#14364). Once
autocomplete merges, this PR rebases to main.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Feature:Visualizations Generic visualization features (in case no more specific feature label is available) review v6.0.0 v6.1.0 v7.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants