mirror of
https://github.com/lancedb/lancedb.git
synced 2026-01-04 10:52:56 +00:00
- operator for match query - slop for phrase query - boolean query <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced support for boolean full-text search queries with AND/OR logic and occurrence conditions. - Added operator options for match and multi-match queries to control term combination logic. - Enabled phrase queries to specify proximity (slop) for flexible phrase matching. - Added new enumerations (`Operator`, `Occur`) and the `BooleanQuery` class for enhanced query expressiveness. - **Bug Fixes** - Improved validation and error handling for invalid operator and occurrence inputs in full-text queries. - **Tests** - Expanded test coverage with new cases for boolean queries and operator-based full-text searches. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: BubbleCal <bubble-cal@outlook.com>
54 lines
1.1 KiB
Markdown
54 lines
1.1 KiB
Markdown
[**@lancedb/lancedb**](../README.md) • **Docs**
|
|
|
|
***
|
|
|
|
[@lancedb/lancedb](../globals.md) / BooleanQuery
|
|
|
|
# Class: BooleanQuery
|
|
|
|
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
|
|
|
|
- [`FullTextQuery`](../interfaces/FullTextQuery.md)
|
|
|
|
## Constructors
|
|
|
|
### new BooleanQuery()
|
|
|
|
```ts
|
|
new BooleanQuery(queries): BooleanQuery
|
|
```
|
|
|
|
Creates an instance of BooleanQuery.
|
|
|
|
#### Parameters
|
|
|
|
* **queries**: [[`Occur`](../enumerations/Occur.md), [`FullTextQuery`](../interfaces/FullTextQuery.md)][]
|
|
An array of (Occur, FullTextQuery objects) to combine.
|
|
Occur specifies whether the query must match, or should match.
|
|
|
|
#### Returns
|
|
|
|
[`BooleanQuery`](BooleanQuery.md)
|
|
|
|
## Methods
|
|
|
|
### queryType()
|
|
|
|
```ts
|
|
queryType(): FullTextQueryType
|
|
```
|
|
|
|
The type of the full-text query.
|
|
|
|
#### Returns
|
|
|
|
[`FullTextQueryType`](../enumerations/FullTextQueryType.md)
|
|
|
|
#### Implementation of
|
|
|
|
[`FullTextQuery`](../interfaces/FullTextQuery.md).[`queryType`](../interfaces/FullTextQuery.md#querytype)
|