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
Copy file name to clipboardexpand all lines: README.md
+32
Original file line number
Diff line number
Diff line change
@@ -105,6 +105,38 @@ Finally we can invoke search queries by invoking following API.
105
105
PackageSearch.search("the text to search");
106
106
```
107
107
108
+
### Pagination
109
+
110
+
You can provide options to limit your search query and implement pagination into your search: `skip` and `limit`. SearchSource will also sanitize your limiting options to only fetch data from you backend that is not already in history (that is, if you enabled local history caching by configuring a value for keepInHistory).
111
+
112
+
```js
113
+
PackageSearch.search("the text to search", {
114
+
skip:0,
115
+
limit:12
116
+
});
117
+
```
118
+
119
+
For example, when you do the following subsequent searches with the same text string to seacrh for
120
+
```js
121
+
[
122
+
{skip:0, limit:24},
123
+
{skip:0, limit:36},
124
+
{skip:12, limit:36},
125
+
{skip:24, limit:24},
126
+
];
127
+
```
128
+
129
+
SearchSource will send the following requests on your backend (when keepInhistory is enabled):
130
+
```js
131
+
[
132
+
{skip:0, limit:24},
133
+
{skip:24, limit:12},
134
+
{skip:36, limit:12}
135
+
];
136
+
```
137
+
138
+
To see an elaborate example on how to implement a paged search application, go to (http://infinitesearch.meteor.com).
139
+
108
140
### Status
109
141
110
142
You can get the status of the search source by invoking following API. It's reactive too.
0 commit comments