scitex-dev

Contents

  • Quick Start
  • API Reference
  • Unified Search
    • Query Syntax
    • Scopes
    • API
      • search()
      • parse_query()
      • score_text()
  • Scoped documentation verification
  • CLI Mixin
scitex-dev
  • Unified Search
  • View page source

Unified Search

Search across the entire SciTeX ecosystem — Python APIs, CLI commands, MCP tools, and documentation pages.

Query Syntax

Google-like query operators:

Syntax

Meaning

Example

word

Optional term (boosts score)

search("save figure")

+word

Required term (must match)

search("+ttest stats")

-word

Excluded term (must NOT match)

search("stats -deprecated")

"phrase"

Exact phrase match

search('"save figure"')

Scopes

Scope

Searches

all

Everything (default)

api

Python API functions, classes, methods

cli

CLI subcommands (console_scripts entry points)

mcp

MCP tool names and descriptions

docs

Documentation page titles and content

API

scitex_dev._docs.search.search(query: str, scope: Literal['all', 'api', 'cli', 'mcp', 'docs'] = 'all', package: str | None = None, packages: list[str] | None = None, max_results: int = 10, fuzzy: bool = True) → list[dict[str, Any]][source]

Search across the SciTeX ecosystem.

Query syntax:

“save figure” → match any term ‘“exact phrase”’ → match exact phrase “+required term” → term must appear “-excluded” → results with this term are removed

Parameters:
  • query – Search query (supports +required, -excluded, “phrases”).

  • scope – What to search — “all”, “api”, “cli”, “mcp”, or “docs”.

  • package – Limit to a single package.

  • packages – Limit to specific packages.

  • max_results – Maximum results to return.

  • fuzzy – Enable fuzzy matching via difflib (default True).

Returns:

package, name, title, score, scope, match_type. Sorted by relevance (score descending).

Return type:

List of dicts with

scitex_dev._docs.search.parse_query(query: str) → ParsedQuery[source]

Parse a Google-like query string.

Supports:

word → optional term (boosts score) +word → required term (must match) -word → excluded term (must NOT match) “phrase” → exact phrase match

scitex_dev._docs.search.score_text(pq: ParsedQuery, text: str, fuzzy: bool = True) → float[source]

Score text against a parsed query.

Returns:

Score >= 0. Returns -1 if excluded term found or required term missing.

Previous Next

© Copyright 2026, Yusuke Watanabe.

Built with Sphinx using a theme provided by Read the Docs.