LexicalApiRetriever#

class ansys.fluent.mcp.solve.catalog.retriever.LexicalApiRetriever(index: ansys.fluent.mcp.solve.catalog.index.ApiIndex | None = None)#

Bases: ApiRetriever

Thin async adapter over ApiIndex.search.

Carries no scoring logic of its own — the BM25 ranker, substring bonus and depth penalty all live in ansys.fluent.mcp.common.api_index.

Overview#

retrieve

Retrieve API hits that match the query and filters.

Import detail#

from ansys.fluent.mcp.solve.catalog.retriever import LexicalApiRetriever

Attribute detail#

LexicalApiRetriever.name = 'lexical'#

Method detail#

async LexicalApiRetriever.retrieve(query: str, *, top_k: int = 10, kinds: Sequence[str] | None = None, under: str | None = None) list[ApiHit]#

Retrieve API hits that match the query and filters.

Parameters:
querystr

Search text or user request to evaluate.

top_kint

Maximum number of results to return.

kindsOptional[Sequence[str]]

Optional result kinds used to narrow the operation.

underOptional[str]

Optional path prefix used to scope the operation.

Returns:
list[ApiHit]

List of results produced by the operation.