You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- In the backend 0 was always earlier converted to 1, but allowing 0 in
the client could give the impression that paging started on 0 and that
matchPageNext would yield the next page when it in reality just fetched
the same page once more.
- Also added some spelling fixes.
Copy file name to clipboardExpand all lines: GETTING_STARTED.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,15 +10,15 @@ The two central classes are [[SearchClient]] and [[Settings]]:
10
10
11
11
The central class is the [[SearchClient]]. To start using it you will need to create a new instance of it. The constructor takes two parameters, a baseUrl and optionally a settings object.
12
12
13
-
* The base-url is typically `"http://myserver:9950"` for theIntelliSearch SearchService.
13
+
* The base-url is typically `"http://myserver:9950"` for the IntelliSearch SearchService.
14
14
* The settings object has properties that help you customize the solution to your needs.
15
15
* If you are using the "manual" mode with promises, then you can leave this empty.
16
16
* If you want to use the "automatic" mode, then you will have to set up some of these properties.
17
17
* Use the settings' version parameter to override the default 3 with 2 (if you are using a v2 backend rest-interface).
18
18
19
19
### [[Settings]]
20
20
21
-
The [[Settings]]Settings</a> class holds properties as follows:
21
+
The [[Settings]] class holds properties as follows:
22
22
23
23
*`allCategories`: [[AllCategoriesSettings]]</a>
24
24
*`authentication`: [[AuthenticationSettings]]</a>
@@ -63,7 +63,7 @@ In addition the `filters` and `matchPage` properties also have a couple of helpe
63
63
*`filterAdd(string filter)`
64
64
*`filterRemove(string filter)`
65
65
*`matchPageNext()`
66
-
*`matcPagePrev()`
66
+
*`matchPagePrev()`
67
67
68
68
### Set up triggers
69
69
@@ -157,7 +157,7 @@ The web-service properties are available though (as long as you didn't pass `ena
157
157
findLoading = false;
158
158
},
159
159
triggers: {
160
-
queryChanged: true // Means that the match-results will update on queryChanges, and according to the other default trigger values. Still needs minLength and triggerdelay is also obeyed. This example allows a kind of realtime search for matches.
160
+
queryChanged: true // Means that the match-results will update on queryChanges, and according to the other default trigger values. Still needs minLength and triggerDelay is also obeyed. This example allows a kind of real-time search for matches.
161
161
}
162
162
},
163
163
categorize: {
@@ -175,7 +175,7 @@ The web-service properties are available though (as long as you didn't pass `ena
175
175
categorizeLoading = false;
176
176
},
177
177
triggers: {
178
-
// Here we don't change the triggers. queryChange is false so it will not "autosearch".
178
+
// Here we don't change the triggers. queryChange is false so it will not "auto-search".
179
179
}
180
180
},
181
181
autocomplete: {
@@ -232,7 +232,7 @@ If you however want to use authentication, then there are a couple of things tha
232
232
233
233
1. A web-service that identifies the user must be setup that is accessible from the page that the search-client runs on.
234
234
* The web-service endpoint must identify the user and create a JWT that is returned.
235
-
* On the server-side the JWT needs to be generated by using the same secret key as is set up in the SearchService (a random key was generated on setup and should be preconfigured).
235
+
* On the server-side the JWT needs to be generated by using the same secret key as is set up in the SearchService (a random key was generated on setup and should be pre-configured).
236
236
* A choice must be made on the expiration time for the token. It is suggested to be liberal, but to still have an expiration time. An hour would probably be fine in many cases.
237
237
* It is suggested that the creation time property in the JWT is backdated with a minute or so to cope for time variances between the SearchService and this web-service.
238
238
@@ -242,10 +242,10 @@ If you however want to use authentication, then there are a couple of things tha
242
242
If the returned structure is `{ user: { jwt: "actualtokenhash" } }` then the tokenPath should be `[ "user", "jwt" ]`.
243
243
* By default
244
244
245
-
The authentication system, when enabled will attempt to fetch the authentication-token as soon as it is setup (trying to prefetch it to have it ready asap in case a search is made).
245
+
The authentication system, when enabled will attempt to fetch the authentication-token as soon as it is setup (trying to pre-fetch it to have it ready asap in case a search is made).
246
246
247
247
The authentication system decodes the jwt-token when received and checks for when the token expires. It then sets up a timeout to fetch a new token in ample time before the current one expires. The overlap for this is defined in its triggers: `authentication: { triggers: { expiryOverlap: 60 } }`. The default is 60 seconds, which means that the client will try to get a new JWT 60 seconds before the old one expires.
248
248
249
249
## Documentation / Intellisense / Types
250
250
251
-
If you are using typescript, then the datatypes are available for your IDE to use. If not, then all types and definitions are available in the generated API-documentation in the search-client docs-folder (typically `./node_modules/search-client/docs/index.html`).
251
+
If you are using typescript, then the data-types are available for your IDE to use. If not, then all types and definitions are available in the generated API-documentation in the search-client docs-folder (typically `./node_modules/search-client/docs/index.html`).
<p><strong>Note:</strong> Changing the <code>query</code> property will likely lead to multiple trigger-checks and potential updates.
860
860
This is because changing the whole value will lead to each of the query-objects' properties to trigger individual
861
861
events.</p>
862
-
<p>To avoid mutliple updates, call <code>deferUpdates(true)</code> before and deferUpdates(false) afterwards. Then at max
862
+
<p>To avoid multiple updates, call <code>deferUpdates(true)</code> before and deferUpdates(false) afterwards. Then at max
863
863
only one update will be generated.</p>
864
864
</div>
865
865
<h4class="tsd-parameters-title">Parameters</h4>
@@ -994,14 +994,14 @@ <h3>defer<wbr>Updates</h3>
994
994
// When calling deferUpdates with (<spanclass="hljs-literal">false</span>) the above two update-events are now executed <spanclass="hljs-keyword">as</span> one instead (both value-changes are accounted <spanclass="hljs-keyword">for</span> though)
// Exmaple<spanclass="hljs-number">4</span>: Defer <spanclass="hljs-keyword">update</span><spanclass="hljs-keyword">only</span><spanclass="hljs-keyword">for</span> one service (Categorize <spanclass="hljs-keyword">in</span> this sample):
1004
+
// Example<spanclass="hljs-number">4</span>: Defer <spanclass="hljs-keyword">update</span><spanclass="hljs-keyword">only</span><spanclass="hljs-keyword">for</span> one service (Categorize <spanclass="hljs-keyword">in</span> this sample):
0 commit comments