@findlane/server 0.29.0 → 0.31.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
@@ -59,9 +59,22 @@ export type IndexSettings = {
59
59
  rules?: QueryRule[];
60
60
  /** Languages whose common words queries drop, and whose plurals and alternative spellings match. */
61
61
  languages?: Array<"da" | "de" | "en" | "is" | "no" | "sv">;
62
+ /** Icelandic word forms (0.30.0), with "is" among the languages: a query word of 4+ letters that no word
63
+ * of the index is or begins with also matches the other forms of its word from the BÍN dictionary
64
+ * ("kjólar" finds "Kjóll", "jokerinn" finds "Joker"), and a search that finds nothing tries every word's
65
+ * forms. Searches that find results with the words as typed don't change. Off by default. */
66
+ inflections?: boolean;
62
67
  /** Searches say which words typo tolerance corrected, and `suggest()` offers a corrected query for a
63
68
  * search that finds nothing. Off by default. */
64
69
  didYouMean?: boolean;
70
+ /** Learn from clicks (0.31.0): each search with 10+ clicks in 30 days puts its up to 5 most clicked and
71
+ * bought products first within their rank first group, after rules; learned daily. Off by default. */
72
+ learnedRanking?: boolean;
73
+ /** Searches (as typed, any case) and product IDs that learning from clicks leaves out, applied at once. */
74
+ learnedExclusions?: {
75
+ queries?: string[];
76
+ products?: string[];
77
+ };
65
78
  /** Compound words find each other written as one word or apart, in any language: a query word that the
66
79
  * index's words show is a compound also matches its parts written apart ("sjóræningjabúningur" finds
67
80
  * "Sjóræningja búningur"), and neighbouring query words the word they make ("face paint" finds "facepaint").
@@ -437,7 +450,8 @@ export type GeoBox = {
437
450
  west: number;
438
451
  };
439
452
  /** How a query word matched: as itself, as the start of a longer word, within its typos, through a synonym,
440
- * as another form of the word in the index's languages (a plural or another spelling), or, with the
453
+ * as another form of the word in the index's languages (a plural or another spelling, or with `inflections`
454
+ * an Icelandic case or plural), or, with the
441
455
  * `compoundWords` setting, as a compound: its parts written apart, or the word it makes with a neighbouring
442
456
  * query word. */
443
457
  export type MatchKind = "exact" | "prefix" | "typo" | "synonym" | "form" | "compound";
package/dist/index.d.ts CHANGED
@@ -59,9 +59,22 @@ export type IndexSettings = {
59
59
  rules?: QueryRule[];
60
60
  /** Languages whose common words queries drop, and whose plurals and alternative spellings match. */
61
61
  languages?: Array<"da" | "de" | "en" | "is" | "no" | "sv">;
62
+ /** Icelandic word forms (0.30.0), with "is" among the languages: a query word of 4+ letters that no word
63
+ * of the index is or begins with also matches the other forms of its word from the BÍN dictionary
64
+ * ("kjólar" finds "Kjóll", "jokerinn" finds "Joker"), and a search that finds nothing tries every word's
65
+ * forms. Searches that find results with the words as typed don't change. Off by default. */
66
+ inflections?: boolean;
62
67
  /** Searches say which words typo tolerance corrected, and `suggest()` offers a corrected query for a
63
68
  * search that finds nothing. Off by default. */
64
69
  didYouMean?: boolean;
70
+ /** Learn from clicks (0.31.0): each search with 10+ clicks in 30 days puts its up to 5 most clicked and
71
+ * bought products first within their rank first group, after rules; learned daily. Off by default. */
72
+ learnedRanking?: boolean;
73
+ /** Searches (as typed, any case) and product IDs that learning from clicks leaves out, applied at once. */
74
+ learnedExclusions?: {
75
+ queries?: string[];
76
+ products?: string[];
77
+ };
65
78
  /** Compound words find each other written as one word or apart, in any language: a query word that the
66
79
  * index's words show is a compound also matches its parts written apart ("sjóræningjabúningur" finds
67
80
  * "Sjóræningja búningur"), and neighbouring query words the word they make ("face paint" finds "facepaint").
@@ -437,7 +450,8 @@ export type GeoBox = {
437
450
  west: number;
438
451
  };
439
452
  /** How a query word matched: as itself, as the start of a longer word, within its typos, through a synonym,
440
- * as another form of the word in the index's languages (a plural or another spelling), or, with the
453
+ * as another form of the word in the index's languages (a plural or another spelling, or with `inflections`
454
+ * an Icelandic case or plural), or, with the
441
455
  * `compoundWords` setting, as a compound: its parts written apart, or the word it makes with a neighbouring
442
456
  * query word. */
443
457
  export type MatchKind = "exact" | "prefix" | "typo" | "synonym" | "form" | "compound";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@findlane/server",
3
- "version": "0.29.0",
3
+ "version": "0.31.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",