@lancedb/lancedb 0.20.1-beta.2 → 0.21.1-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/native.d.ts CHANGED
@@ -381,7 +381,7 @@ export class VectorQuery {
381
381
  analyzePlan(): Promise<string>
382
382
  }
383
383
  export class JsFullTextQuery {
384
- static matchQuery(query: string, column: string, boost: number, fuzziness: number | undefined | null, maxExpansions: number, operator: string): JsFullTextQuery
384
+ static matchQuery(query: string, column: string, boost: number, fuzziness: number | undefined | null, maxExpansions: number, operator: string, prefixLength: number): JsFullTextQuery
385
385
  static phraseQuery(query: string, column: string, slop: number): JsFullTextQuery
386
386
  static boostQuery(positive: JsFullTextQuery, negative: JsFullTextQuery, negativeBoost?: number | undefined | null): JsFullTextQuery
387
387
  static multiMatchQuery(query: string, columns: Array<string>, boosts: Array<number> | undefined | null, operator: string): JsFullTextQuery
package/dist/query.d.ts CHANGED
@@ -445,10 +445,12 @@ export declare enum Operator {
445
445
  *
446
446
  * - `Must`: The term must be present in the document.
447
447
  * - `Should`: The term should contribute to the document score, but is not required.
448
+ * - `MustNot`: The term must not be present in the document.
448
449
  */
449
450
  export declare enum Occur {
451
+ Should = "SHOULD",
450
452
  Must = "MUST",
451
- Should = "SHOULD"
453
+ MustNot = "MUST_NOT"
452
454
  }
453
455
  /**
454
456
  * Represents a full-text query interface.
@@ -481,12 +483,14 @@ export declare class MatchQuery implements FullTextQuery {
481
483
  * - `fuzziness`: The fuzziness level for the query (default is 0).
482
484
  * - `maxExpansions`: The maximum number of terms to consider for fuzzy matching (default is 50).
483
485
  * - `operator`: The logical operator to use for combining terms in the query (default is "OR").
486
+ * - `prefixLength`: The number of beginning characters being unchanged for fuzzy matching.
484
487
  */
485
488
  constructor(query: string, column: string, options?: {
486
489
  boost?: number;
487
490
  fuzziness?: number;
488
491
  maxExpansions?: number;
489
492
  operator?: Operator;
493
+ prefixLength?: number;
490
494
  });
491
495
  queryType(): FullTextQueryType;
492
496
  }
package/dist/query.js CHANGED
@@ -708,11 +708,13 @@ var Operator;
708
708
  *
709
709
  * - `Must`: The term must be present in the document.
710
710
  * - `Should`: The term should contribute to the document score, but is not required.
711
+ * - `MustNot`: The term must not be present in the document.
711
712
  */
712
713
  var Occur;
713
714
  (function (Occur) {
714
- Occur["Must"] = "MUST";
715
715
  Occur["Should"] = "SHOULD";
716
+ Occur["Must"] = "MUST";
717
+ Occur["MustNot"] = "MUST_NOT";
716
718
  })(Occur || (exports.Occur = Occur = {}));
717
719
  // biome-ignore lint/suspicious/noExplicitAny: we want any here
718
720
  function instanceOfFullTextQuery(obj) {
@@ -731,13 +733,14 @@ class MatchQuery {
731
733
  * - `fuzziness`: The fuzziness level for the query (default is 0).
732
734
  * - `maxExpansions`: The maximum number of terms to consider for fuzzy matching (default is 50).
733
735
  * - `operator`: The logical operator to use for combining terms in the query (default is "OR").
736
+ * - `prefixLength`: The number of beginning characters being unchanged for fuzzy matching.
734
737
  */
735
738
  constructor(query, column, options) {
736
739
  let fuzziness = options?.fuzziness;
737
740
  if (fuzziness === undefined) {
738
741
  fuzziness = 0;
739
742
  }
740
- this.inner = native_1.JsFullTextQuery.matchQuery(query, column, options?.boost ?? 1.0, fuzziness, options?.maxExpansions ?? 50, options?.operator ?? Operator.Or);
743
+ this.inner = native_1.JsFullTextQuery.matchQuery(query, column, options?.boost ?? 1.0, fuzziness, options?.maxExpansions ?? 50, options?.operator ?? Operator.Or, options?.prefixLength ?? 0);
741
744
  }
742
745
  queryType() {
743
746
  return FullTextQueryType.Match;
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "ann"
12
12
  ],
13
13
  "private": false,
14
- "version": "0.20.1-beta.2",
14
+ "version": "0.21.1-beta.0",
15
15
  "main": "dist/index.js",
16
16
  "exports": {
17
17
  ".": "./dist/index.js",
@@ -100,14 +100,14 @@
100
100
  "reflect-metadata": "^0.2.2"
101
101
  },
102
102
  "optionalDependencies": {
103
- "@lancedb/lancedb-darwin-x64": "0.20.1-beta.2",
104
- "@lancedb/lancedb-darwin-arm64": "0.20.1-beta.2",
105
- "@lancedb/lancedb-linux-x64-gnu": "0.20.1-beta.2",
106
- "@lancedb/lancedb-linux-arm64-gnu": "0.20.1-beta.2",
107
- "@lancedb/lancedb-linux-x64-musl": "0.20.1-beta.2",
108
- "@lancedb/lancedb-linux-arm64-musl": "0.20.1-beta.2",
109
- "@lancedb/lancedb-win32-x64-msvc": "0.20.1-beta.2",
110
- "@lancedb/lancedb-win32-arm64-msvc": "0.20.1-beta.2"
103
+ "@lancedb/lancedb-darwin-x64": "0.21.1-beta.0",
104
+ "@lancedb/lancedb-darwin-arm64": "0.21.1-beta.0",
105
+ "@lancedb/lancedb-linux-x64-gnu": "0.21.1-beta.0",
106
+ "@lancedb/lancedb-linux-arm64-gnu": "0.21.1-beta.0",
107
+ "@lancedb/lancedb-linux-x64-musl": "0.21.1-beta.0",
108
+ "@lancedb/lancedb-linux-arm64-musl": "0.21.1-beta.0",
109
+ "@lancedb/lancedb-win32-x64-msvc": "0.21.1-beta.0",
110
+ "@lancedb/lancedb-win32-arm64-msvc": "0.21.1-beta.0"
111
111
  },
112
112
  "peerDependencies": {
113
113
  "apache-arrow": ">=15.0.0 <=18.1.0"