Skip to content

Commit

Permalink
refactor(search): show 20 search results at a time
Browse files Browse the repository at this point in the history
fix #234
  • Loading branch information
BreadGenie committed May 2, 2024
1 parent 66411a6 commit 30a00e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wiki/wiki/doctype/wiki_page/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def search(query, path, space):

use_redisearch = frappe.db.get_single_value("Wiki Settings", "use_redisearch_for_search")
if not use_redisearch or not _redisearch_available:
result = web_search(query, space, 5)
result = web_search(query, space)

for d in result:
d.title = d.title_highlights or d.title
Expand All @@ -44,7 +44,7 @@ def search(query, path, space):

# if redisearch enabled use redisearch
r = frappe.cache()
query = Query(query).paging(0, 5).highlight(tags=['<b class="match">', "</b>"])
query = Query(query).paging(0, 20).highlight(tags=['<b class="match">', "</b>"])

try:
result = r.ft(space).search(query)
Expand Down

0 comments on commit 30a00e4

Please sign in to comment.