Settings for Search. Values fall back through three levels: document → SDK → built-in default. Writes target the document only when set on a document’s settings, otherwise the SDK globally when set on SdkSettings.
Tags: Format
from nutrient_sdk import SearchSettingsConstruction
SearchSettings is accessed through a Document instance for per-document overrides, or via SdkSettings for SDK-wide defaults.
# Per-document overridewith Document.open("input.pdf") as doc: settings = doc.settings.search_settings settings.some_field = new_value # mutate fields directly
# SDK-wide default (applies to all documents)SdkSettings.search_settings.some_field = new_valueSettings are configured by writing to fields on the returned object. The settings property itself cannot be reassigned — doc.settings.search_settings = other_settings is rejected.
Properties
algorithm
@propertydef algorithm(self) -> str
@algorithm.setterdef algorithm(self, value: str) -> NoneRanking algorithm id; empty selects the default. Ignored for an index input.
Type: str
Default: string.Empty
context_lines
@propertydef context_lines(self) -> int
@context_lines.setterdef context_lines(self, value: int) -> NoneContext lines around each hit.
Type: int
Default: 5
display
@propertydef display(self) -> SearchDisplay
@display.setterdef display(self, value: SearchDisplay) -> NoneHow the result is rendered to text.
Type: SearchDisplay
Default: SearchDisplay.Windows
emit_index_path
@propertydef emit_index_path(self) -> str
@emit_index_path.setterdef emit_index_path(self, value: str) -> NonePath to also write a reusable index to; empty disables.
Type: str
Default: string.Empty
mode
@propertydef mode(self) -> SearchMode
@mode.setterdef mode(self, value: SearchMode) -> NoneHow aggressively weak matches are filtered.
Type: SearchMode
Default: SearchMode.Balanced
stemming_language
@propertydef stemming_language(self) -> str
@stemming_language.setterdef stemming_language(self, value: str) -> NoneISO 639-1 language whose stemmer to apply (e.g. "en"), so morphological variants of a word match. "auto" detects the document language (via CLD3, when available). Empty or unsupported means no stemming.
Type: str
Default: string.Empty
top_k
@propertydef top_k(self) -> int
@top_k.setterdef top_k(self, value: int) -> NoneMaximum number of windows to return.
Type: int
Default: 8