From 011def461ca07bcf545d63831b55613555374315 Mon Sep 17 00:00:00 2001 From: Will Jones Date: Thu, 30 Jul 2026 16:19:38 -0700 Subject: [PATCH] docs(python): fix cross-references that resolved to the wrong page `mkdocs build --strict` only catches references it cannot resolve. A bare anchor such as `[limit][]` or `[vector search][search]` is matched by autorefs against any heading on the site, so six of them silently linked into the JavaScript reference instead. The relative links in `permutation.py` and `remote/errors.py` pointed at in-page anchors and paths that do not exist. Targets that still exist here or in an imported inventory now use mkdocstrings references; the guide pages deleted in #2770 use their lancedb.com URLs. Co-Authored-By: Claude Opus 5 (1M context) --- python/python/lancedb/permutation.py | 17 +++++++++++------ python/python/lancedb/query.py | 13 ++++++++----- python/python/lancedb/remote/errors.py | 4 ++-- python/python/lancedb/remote/table.py | 3 ++- python/python/lancedb/table.py | 7 ++++--- 5 files changed, 27 insertions(+), 17 deletions(-) diff --git a/python/python/lancedb/permutation.py b/python/python/lancedb/permutation.py index 8aa764c4b..b3d95c352 100644 --- a/python/python/lancedb/permutation.py +++ b/python/python/lancedb/permutation.py @@ -438,7 +438,8 @@ class Permutation: _reader: Optional[PermutationReader] = None, ): """ - Internal constructor. Use [from_tables](#from_tables) instead. + Internal constructor. Use + [from_tables][lancedb.permutation.Permutation.from_tables] instead. """ assert base_table is not None, "base_table is required" assert selection is not None, "selection is required" @@ -985,8 +986,9 @@ class Permutation: types. Conversion of strings, lists, and structs will require creating python objects and this is not zero-copy. - For custom formatting, use [with_transform](#with_transform) which overrides - this method. + For custom formatting, use + [with_transform][lancedb.permutation.Permutation.with_transform] which + overrides this method. """ assert format is not None, "format is required" if format == "python": @@ -1061,7 +1063,8 @@ class Permutation: Note: this method returns a new permutation and does not modify `self` It is provided for compatibility with the huggingface Dataset API. - Use [with_skip](#with_skip) instead to avoid confusion. + Use [with_skip][lancedb.permutation.Permutation.with_skip] instead to + avoid confusion. """ return self.with_skip(skip) @@ -1084,7 +1087,8 @@ class Permutation: Note: this method returns a new permutation and does not modify `self` It is provided for compatibility with the huggingface Dataset API. - Use [with_take](#with_take) instead to avoid confusion. + Use [with_take][lancedb.permutation.Permutation.with_take] instead to + avoid confusion. """ return self.with_take(limit) @@ -1107,7 +1111,8 @@ class Permutation: Note: this method returns a new permutation and does not modify `self` It is provided for compatibility with the huggingface Dataset API. - Use [with_repeat](#with_repeat) instead to avoid confusion. + Use [with_repeat][lancedb.permutation.Permutation.with_repeat] instead + to avoid confusion. """ return self.with_repeat(times) diff --git a/python/python/lancedb/query.py b/python/python/lancedb/query.py index 33f72edcf..97a27cad4 100644 --- a/python/python/lancedb/query.py +++ b/python/python/lancedb/query.py @@ -651,7 +651,8 @@ class Query(pydantic.BaseModel): distance_type : Optional[str] the distance type to use for vector search - This can be l2 (default), cosine and dot. See [metric definitions][search] for + This can be l2 (default), cosine and dot. See + [metric definitions](https://lancedb.com/docs/search/vector-search/) for more details. If this is not a vector search this will be None. @@ -3381,8 +3382,9 @@ class AsyncQuery(AsyncStandardQuery): are various ANN search parameters that will let you fine tune your recall accuracy vs search latency. - Vector searches always have a [limit][]. If `limit` has not been called then - a default `limit` of 10 will be used. + Vector searches always have a + [limit][lancedb.query.AsyncVectorQuery.limit]. If `limit` has not been + called then a default `limit` of 10 will be used. Typically, a single vector is passed in as the query. However, you can also pass in multiple vectors. When multiple vectors are passed in, if the vector @@ -3513,8 +3515,9 @@ class AsyncFTSQuery(AsyncStandardQuery): are various ANN search parameters that will let you fine tune your recall accuracy vs search latency. - Hybrid searches always have a [limit][]. If `limit` has not been called then - a default `limit` of 10 will be used. + Hybrid searches always have a + [limit][lancedb.query.AsyncHybridQuery.limit]. If `limit` has not been + called then a default `limit` of 10 will be used. Typically, a single vector is passed in as the query. However, you can also pass in multiple vectors. This can be useful if you want to find the nearest diff --git a/python/python/lancedb/remote/errors.py b/python/python/lancedb/remote/errors.py index 2f2dad9b4..5aa13a9c7 100644 --- a/python/python/lancedb/remote/errors.py +++ b/python/python/lancedb/remote/errors.py @@ -53,9 +53,9 @@ class RetryError(LanceDBClientError): """An error that occurs when the client has exceeded the maximum number of retries. The retry strategy can be adjusted by setting the - [retry_config](lancedb.remote.ClientConfig.retry_config) in the client + [retry_config][lancedb.remote.ClientConfig.retry_config] in the client configuration. This is passed in the `client_config` argument of - [connect](lancedb.connect) and [connect_async](lancedb.connect_async). + [connect][lancedb.connect] and [connect_async][lancedb.connect_async]. The __cause__ attribute of this exception will be the last exception that caused the retry to fail. It will be an diff --git a/python/python/lancedb/remote/table.py b/python/python/lancedb/remote/table.py index 628a98983..7cdc4bb74 100644 --- a/python/python/lancedb/remote/table.py +++ b/python/python/lancedb/remote/table.py @@ -642,7 +642,8 @@ class RemoteTable(Table): fast_search: bool = False, ) -> LanceVectorQueryBuilder: """Create a search query to find the nearest neighbors - of the given query vector. We currently support [vector search][search] + of the given query vector. We currently support + [vector search](https://lancedb.com/docs/search/vector-search/) All query options are defined in [LanceVectorQueryBuilder][lancedb.query.LanceVectorQueryBuilder]. diff --git a/python/python/lancedb/table.py b/python/python/lancedb/table.py index a7c48faf4..bc5833d92 100644 --- a/python/python/lancedb/table.py +++ b/python/python/lancedb/table.py @@ -3389,7 +3389,7 @@ class LanceTable(Table): ) -> LanceQueryBuilder: """Create a search query to find the nearest neighbors of the given query vector. We currently support [vector search](https://lancedb.com/docs/search/vector-search/) - and [full-text search][search]. + and [full-text search](https://lancedb.com/docs/search/full-text-search/). Examples -------- @@ -3419,8 +3419,9 @@ class LanceTable(Table): - *default None*. Acceptable types are: list, np.ndarray, PIL.Image.Image - - If None then the select/[where][sql]/limit clauses are applied - to filter the table + - If None then the + select/[where][lancedb.query.LanceQueryBuilder.where]/limit clauses + are applied to filter the table vector_column_name: str, optional The name of the vector column to search.