def build_query(cardset=None):
    """Build a query for Scryfall.com's full text search.
    
    :param set: (Optional.) The set code to search for.
    :return: A :class:string with the query.
    :rtype: string
    """
    q = ''
    if cardset:
        q += 'set:{} '.format(cardset)
    return q