Skip to content

Python package

ra.file_search

Instant search over indexed design files.

import rhinoartisan as ra

Wraps ArtisanPlugin.Scripting.FileSearchApi.

Functions

Function
count()Number of files currently in the index.
reindex()Rebuilds the index from the configured folders on a background thread and returns immediately — results of a Search right after may still be from the old index.
search()Searches the file index.

ra.file_search.count()

ra.file_search.count() -> int

Number of files currently in the index.

ra.file_search.reindex()

ra.file_search.reindex(full=None)

Rebuilds the index from the configured folders on a background thread and returns immediately — results of a Search right after may still be from the old index. full forces a clean re-scan.

ParameterType
fullbooloptional — None = the tool default

ra.file_search.search()

ra.file_search.search(query: str, max=None) -> List[Any]

Searches the file index. Multiple whitespace-separated tokens must ALL match (order-independent); results are ranked exact-name, starts-with, contains. An EMPTY query returns the most recently modified files. Each entry has: FullPath, FileName, Extension, Size (bytes) and ModifiedUtc.

ParameterType
querystrrequired
maxintoptional — None = the tool default