Feature Request: Add default search mode configuration setting

Open
#164 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python, vscode
Domain
tooling

Research direction

Start in package.json's contributes configuration section to trace how settings are declared, then locate the code that constructs Splunk SDK search jobs. Verify how the new default interacts with inline search_mode overrides and test that settings.json values apply to SPL queries from both .splnb notebooks and .spl files.

Written by the indexing model from the issue text.

Description

Feature Request

Problem Statement

When executing SPL queries in .splnb notebooks or .spl files, the extension currently uses the default Splunk search mode (typically "fast" or "smart"), which can miss events when fields are not extracted at index time. For indexes where field extraction happens at search time, this results in incomplete query results.

Requested Feature

Add a workspace/user configuration setting to specify the default search mode for SPL query execution:

"splunk.defaultSearchMode": "verbose"  // Options: "fast", "smart", "verbose"
Use Case

In threat hunting and security analysis workflows, we frequently work with data sources where field extraction occurs at search time rather than index time. When searches run in fast mode, events can be missed because the search head doesn't parse all fields during query execution.

Desired Solution: Set a default in settings.json:

"splunk.defaultSearchMode": "verbose"
Benefits
  1. Consistency - Ensures all queries in a workspace execute with the appropriate search mode without manual annotation
  2. Accuracy - Reduces risk of incomplete results from fast mode searches on appropriate data sources
  3. Developer Experience - Eliminates repetitive inline parameter additions
  4. Flexibility - Users can still override with inline parameters when needed
Implementation Suggestions
  • Add configuration option to package.json contributes section
  • Apply the setting when constructing search jobs via the Splunk SDK
  • Allow per-query overrides with inline search_mode= parameter
  • Consider adding to connection profile settings as an alternative
Related Splunk Documentation
Dominant language
Python
Stars
97
Forks
27
Avg merge
3d 24m
Merged PRs (30d)
2

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from splunk/vscode-extension-splunk

All issues in splunk/vscode-extension-splunk

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.