Skip to content

Commit

Permalink
Limit simple search
Browse files Browse the repository at this point in the history
  • Loading branch information
smithellis committed Nov 1, 2024
1 parent 5d6c2e3 commit 1ba7b20
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions kitsune/search/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,13 @@ def simple_search(request):

# apply aaq/kb configs
if cleaned["w"] & constants.WHERE_WIKI:
search.add(WikiSearch(query=cleaned["q"], locale=language, product=product))
search.add(
WikiSearch(query=cleaned["q"], locale=language, product=product, is_archived=False)
)
if cleaned["w"] & constants.WHERE_SUPPORT:
search.add(QuestionSearch(query=cleaned["q"], locale=language, product=product))
search.add(
QuestionSearch(query=cleaned["q"], locale=language, product=product, is_archived=False)
)

# execute search
page = paginate(
Expand Down

0 comments on commit 1ba7b20

Please sign in to comment.