Update quick_start.asciidoc
Since the `from` property is doing this `from: (pageNum - 1) * perPage,` logic, I think the default for `pageNum` should be `1`. Otherwise it would results it `-15` when `pageNum` and `perPage` are defaults.
This commit is contained in:
@ -112,7 +112,7 @@ NOTE: In this example, `request` and `response` are http://expressjs.com/api.htm
|
||||
|
||||
[source,js]
|
||||
-----------------
|
||||
var pageNum = request.param('page', 0);
|
||||
var pageNum = request.param('page', 1);
|
||||
var perPage = request.param('per_page', 15);
|
||||
var userQuery = request.param('search_query');
|
||||
var userId = request.session.userId;
|
||||
@ -158,4 +158,4 @@ client.search({
|
||||
});
|
||||
-----------------
|
||||
|
||||
You can find a lot more information about filters http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-filters.html[here]
|
||||
You can find a lot more information about filters http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-filters.html[here]
|
||||
|
||||
Reference in New Issue
Block a user