From fa6fff632c3d868bac9a7573760bb60c0872e0d5 Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Thu, 22 Oct 2026 19:17:06 +0200 Subject: [PATCH] docs: document scoring autoprojection query methods --- docs/src/js/classes/AutoQuery.md | 33 ++++++++++++++++++++++++++++++ docs/src/js/classes/Query.md | 33 ++++++++++++++++++++++++++++++ docs/src/js/classes/VectorQuery.md | 33 ++++++++++++++++++++++++++++++ 3 files changed, 99 insertions(+) diff --git a/docs/src/js/classes/AutoQuery.md b/docs/src/js/classes/AutoQuery.md index f12668b90..cfeb3fc4a 100644 --- a/docs/src/js/classes/AutoQuery.md +++ b/docs/src/js/classes/AutoQuery.md @@ -83,6 +83,39 @@ AnalyzeExec verbose=true, metrics=[] *** +### disableScoringAutoprojection() + +```ts +disableScoringAutoprojection(): this +``` + +Disable autoprojection of scoring columns. + +When you specify an explicit projection with [select](AutoQuery.md#select) that does not +include scoring columns (e.g. `_score` for FTS or `_distance` for vector +search), Lance currently auto-includes those columns and emits a +deprecation warning. Calling this method disables that behavior so the +scoring columns are only returned if explicitly selected. + +#### Returns + +`this` + +#### Example + +```ts +const results = await table.vectorSearch([0.1, 0.2]) + .select(["id"]) + .disableScoringAutoprojection() + .toArray(); +``` + +#### Inherited from + +`StandardQueryBase.disableScoringAutoprojection` + +*** + ### execute() ```ts diff --git a/docs/src/js/classes/Query.md b/docs/src/js/classes/Query.md index 8e216d1f4..0b6b4c62b 100644 --- a/docs/src/js/classes/Query.md +++ b/docs/src/js/classes/Query.md @@ -83,6 +83,39 @@ AnalyzeExec verbose=true, metrics=[] *** +### disableScoringAutoprojection() + +```ts +disableScoringAutoprojection(): this +``` + +Disable autoprojection of scoring columns. + +When you specify an explicit projection with [select](Query.md#select) that does not +include scoring columns (e.g. `_score` for FTS or `_distance` for vector +search), Lance currently auto-includes those columns and emits a +deprecation warning. Calling this method disables that behavior so the +scoring columns are only returned if explicitly selected. + +#### Returns + +`this` + +#### Example + +```ts +const results = await table.vectorSearch([0.1, 0.2]) + .select(["id"]) + .disableScoringAutoprojection() + .toArray(); +``` + +#### Inherited from + +`StandardQueryBase.disableScoringAutoprojection` + +*** + ### execute() ```ts diff --git a/docs/src/js/classes/VectorQuery.md b/docs/src/js/classes/VectorQuery.md index 04ced2ef4..1c5814cd9 100644 --- a/docs/src/js/classes/VectorQuery.md +++ b/docs/src/js/classes/VectorQuery.md @@ -149,6 +149,39 @@ whose data type is a fixed-size-list of floats. *** +### disableScoringAutoprojection() + +```ts +disableScoringAutoprojection(): this +``` + +Disable autoprojection of scoring columns. + +When you specify an explicit projection with [select](VectorQuery.md#select) that does not +include scoring columns (e.g. `_score` for FTS or `_distance` for vector +search), Lance currently auto-includes those columns and emits a +deprecation warning. Calling this method disables that behavior so the +scoring columns are only returned if explicitly selected. + +#### Returns + +`this` + +#### Example + +```ts +const results = await table.vectorSearch([0.1, 0.2]) + .select(["id"]) + .disableScoringAutoprojection() + .toArray(); +``` + +#### Inherited from + +`StandardQueryBase.disableScoringAutoprojection` + +*** + ### distanceRange() ```ts