@findlane/server 0.35.0 → 0.36.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/index.d.cts CHANGED
@@ -430,12 +430,17 @@ export type SearchRequest = {
430
430
  * subindexes count as one search (0.25.0). */
431
431
  subindexes?: Record<string, Omit<SearchRequest, "subindexes"> | true>;
432
432
  /** The facet values the query names (0.34.0): `true` for every field of the index's facetMatches setting, or
433
- * `{ fields }` for some of them. They come back in `facetMatches`. */
433
+ * `{ fields }` for some of them. They come back in `facetMatches`. With the setting's `apply`, a match that names a
434
+ * value exactly filters this search (`applied`, with `rewrittenQuery`); `apply` chooses for this search instead (0.36.0). */
434
435
  facetMatches?: boolean | {
435
436
  fields?: string[];
437
+ apply?: FacetMatchApply;
436
438
  };
437
439
  };
438
- /** The facetMatches setting (0.34.0); see IndexSettings. */
440
+ /** When a search that asks applies a facet match's filter (0.36.0): never (the default), when the match is the whole
441
+ * query, or whenever it names a value exactly, searching the query's other words. */
442
+ export type FacetMatchApply = "never" | "whole" | "exact";
443
+ /** The facetMatches setting (0.34.0); see IndexSettings. A field's `apply` goes over the setting's. */
439
444
  export type FacetMatchesSetting = {
440
445
  fields: Array<{
441
446
  field: string;
@@ -445,13 +450,15 @@ export type FacetMatchesSetting = {
445
450
  only?: "labelled";
446
451
  hide?: string[];
447
452
  link?: string;
453
+ apply?: FacetMatchApply;
448
454
  }>;
455
+ apply?: FacetMatchApply;
449
456
  perField?: number;
450
457
  };
451
458
  /** A facet value a query names (0.34.0): the field's `values` it stands for (several when values share a label),
452
459
  * its `label`, its `count` of records the search's filters allow, how it matched (`match`: exact, prefix, typo,
453
460
  * or contains, a later word of the value), whether it took every word (`whole`), where those words are in `q`
454
- * (`typed`, UTF-16 offsets), its `link`, a `filter` for it, and whether the search applied it (false for now). */
461
+ * (`typed`, UTF-16 offsets), its `link`, a `filter` for it, and whether the search applied it (`applied`, 0.36.0). */
455
462
  export type FacetMatch = {
456
463
  field: string;
457
464
  values: string[];
package/dist/index.d.ts CHANGED
@@ -430,12 +430,17 @@ export type SearchRequest = {
430
430
  * subindexes count as one search (0.25.0). */
431
431
  subindexes?: Record<string, Omit<SearchRequest, "subindexes"> | true>;
432
432
  /** The facet values the query names (0.34.0): `true` for every field of the index's facetMatches setting, or
433
- * `{ fields }` for some of them. They come back in `facetMatches`. */
433
+ * `{ fields }` for some of them. They come back in `facetMatches`. With the setting's `apply`, a match that names a
434
+ * value exactly filters this search (`applied`, with `rewrittenQuery`); `apply` chooses for this search instead (0.36.0). */
434
435
  facetMatches?: boolean | {
435
436
  fields?: string[];
437
+ apply?: FacetMatchApply;
436
438
  };
437
439
  };
438
- /** The facetMatches setting (0.34.0); see IndexSettings. */
440
+ /** When a search that asks applies a facet match's filter (0.36.0): never (the default), when the match is the whole
441
+ * query, or whenever it names a value exactly, searching the query's other words. */
442
+ export type FacetMatchApply = "never" | "whole" | "exact";
443
+ /** The facetMatches setting (0.34.0); see IndexSettings. A field's `apply` goes over the setting's. */
439
444
  export type FacetMatchesSetting = {
440
445
  fields: Array<{
441
446
  field: string;
@@ -445,13 +450,15 @@ export type FacetMatchesSetting = {
445
450
  only?: "labelled";
446
451
  hide?: string[];
447
452
  link?: string;
453
+ apply?: FacetMatchApply;
448
454
  }>;
455
+ apply?: FacetMatchApply;
449
456
  perField?: number;
450
457
  };
451
458
  /** A facet value a query names (0.34.0): the field's `values` it stands for (several when values share a label),
452
459
  * its `label`, its `count` of records the search's filters allow, how it matched (`match`: exact, prefix, typo,
453
460
  * or contains, a later word of the value), whether it took every word (`whole`), where those words are in `q`
454
- * (`typed`, UTF-16 offsets), its `link`, a `filter` for it, and whether the search applied it (false for now). */
461
+ * (`typed`, UTF-16 offsets), its `link`, a `filter` for it, and whether the search applied it (`applied`, 0.36.0). */
455
462
  export type FacetMatch = {
456
463
  field: string;
457
464
  values: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@findlane/server",
3
- "version": "0.35.0",
3
+ "version": "0.36.0",
4
4
  "description": "Findlane server SDK: upload catalogs, manage index settings, and search with a secret workspace API key.",
5
5
  "keywords": ["findlane", "search", "full-text search", "typo tolerance", "ecommerce search", "search api", "sdk"],
6
6
  "license": "MIT",