Browse Source

fix(core): Fix typo in option searchStrategy (#2305)

Alexis Vigoureux 2 years ago
parent
commit
8cd15e1b1a

+ 2 - 2
docs/content/typescript-api/core-plugins/default-search-plugin/default-search-plugin-init-options.md

@@ -23,7 +23,7 @@ Options which configure the behaviour of the DefaultSearchPlugin
 interface DefaultSearchPluginInitOptions {
 interface DefaultSearchPluginInitOptions {
   indexStockStatus?: boolean;
   indexStockStatus?: boolean;
   bufferUpdates?: boolean;
   bufferUpdates?: boolean;
-  searchStategy?: SearchStrategy;
+  searchStrategy?: SearchStrategy;
 }
 }
 ```
 ```
 ## Members
 ## Members
@@ -49,7 +49,7 @@ Collections, as the buffering allows better control over when these expensive jo
 and also performs optimizations to minimize the amount of work that needs to be performed by
 and also performs optimizations to minimize the amount of work that needs to be performed by
 the worker.{{< /member-description >}}
 the worker.{{< /member-description >}}
 
 
-### searchStategy
+### searchStrategy
 
 
 {{< member-info kind="property" type="SearchStrategy" default="undefined"  since="1.6.0" >}}
 {{< member-info kind="property" type="SearchStrategy" default="undefined"  since="1.6.0" >}}
 
 

+ 2 - 2
packages/core/src/plugin/default-search-plugin/fulltext-search.service.ts

@@ -111,8 +111,8 @@ export class FulltextSearchService {
      * Sets the SearchStrategy appropriate to th configured database type.
      * Sets the SearchStrategy appropriate to th configured database type.
      */
      */
     private setSearchStrategy() {
     private setSearchStrategy() {
-        if (this.options.searchStategy) {
-            this._searchStrategy = this.options.searchStategy;
+        if (this.options.searchStrategy) {
+            this._searchStrategy = this.options.searchStrategy;
         } else {
         } else {
             switch (this.connection.rawConnection.options.type) {
             switch (this.connection.rawConnection.options.type) {
                 case 'mysql':
                 case 'mysql':

+ 1 - 1
packages/core/src/plugin/default-search-plugin/types.ts

@@ -120,7 +120,7 @@ export interface DefaultSearchPluginInitOptions {
      * @since 1.6.0
      * @since 1.6.0
      * @default undefined
      * @default undefined
      */
      */
-    searchStategy?: SearchStrategy;
+    searchStrategy?: SearchStrategy;
 }
 }
 
 
 /**
 /**