def search_paginate(page_size=50, page_num=1):
    """Paginate the results for the frontend."""
    page_size = int(page_size)
    page_num = int(page_num)
    if page_size <= 0:
        page_size = 50
    if page_num <= 0:
        page_num = 1
    start = (page_num - 1) * page_size
    end = page_num * page_size
    return (start, end)