Search engines to use resultPerPage param if provided
Co-authored-by: Camila Loiola <camilaibs@gmail.com> Signed-off-by: Emma Indal <emma.indahl@gmail.com>
This commit is contained in:
+1
-1
@@ -210,7 +210,7 @@ export class ElasticSearchSearchEngine implements SearchEngine {
|
||||
.multiMatchQuery(['*'], term)
|
||||
.fuzziness('auto')
|
||||
.minimumShouldMatch(1);
|
||||
const pageSize = 25;
|
||||
const pageSize = query.resultsPerPage || 25;
|
||||
const { page } = decodePageCursor(pageCursor);
|
||||
|
||||
let esbRequestBodySearch = esb
|
||||
|
||||
@@ -71,8 +71,9 @@ export class LunrSearchEngine implements SearchEngine {
|
||||
term,
|
||||
filters,
|
||||
types,
|
||||
resultsPerPage,
|
||||
}: SearchQuery): ConcreteLunrQuery => {
|
||||
const pageSize = 25;
|
||||
const pageSize = resultsPerPage || 25;
|
||||
|
||||
return {
|
||||
lunrQueryBuilder: q => {
|
||||
|
||||
Reference in New Issue
Block a user