Files
lancedb/docs/src/js/classes/BoostQuery.md
BubbleCal 2248aa9508 fix: bugs for new FTS APIs (#2314)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Enhanced full-text search capabilities with support for phrase
queries, fuzzy matching, boosting, and multi-column matching.
- Search methods now accept full-text query objects directly, improving
query flexibility and precision.
- Python and JavaScript SDKs updated to handle full-text queries
seamlessly, including async search support.

- **Tests**
- Added comprehensive tests covering fuzzy search, phrase search, and
boosted queries to ensure robust full-text search functionality.

- **Documentation**
- Updated query class documentation to reflect new constructor options
and removal of deprecated methods for clarity and simplicity.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: BubbleCal <bubble-cal@outlook.com>
2025-04-15 11:51:35 +08:00

1.5 KiB

@lancedb/lancedbDocs


@lancedb/lancedb / BoostQuery

Class: BoostQuery

Represents a full-text query interface. This interface defines the structure and behavior for full-text queries, including methods to retrieve the query type and convert the query to a dictionary format.

Implements

Constructors

new BoostQuery()

new BoostQuery(
   positive,
   negative,
   options?): BoostQuery

Creates an instance of BoostQuery. The boost returns documents that match the positive query, but penalizes those that match the negative query. the penalty is controlled by the negativeBoost parameter.

Parameters

  • positive: FullTextQuery The positive query that boosts the relevance score.

  • negative: FullTextQuery The negative query that reduces the relevance score.

  • options? Optional parameters for the boost query.

    • negativeBoost: The boost factor for the negative query (default is 0.0).
  • options.negativeBoost?: number

Returns

BoostQuery

Methods

queryType()

queryType(): FullTextQueryType

The type of the full-text query.

Returns

FullTextQueryType

Implementation of

FullTextQuery.queryType