def GenerateNewsYql(params):
    '[Generator of YQL vespa query, to have a refine request on the vespa cluster]\n    In this case, the YQL depends on the search definition of the document type in the vespa cluster\n    Modify with risk, some parameters position are important, such as limit\n    \n    Returns:\n        yql [string] -- [String that select documents based on userquery\n    '
    yql = '&yql=select * from sources * where userQuery()'
    if ('source' in params):
        yql += ((' and hostsite contains " ' + params['source']) + ' "')
    if ('language' in params):
        yql += ((' and country contains "' + params['language']) + '"')
    yql += GenerateDateParamYql(params)
    if ('count' in params):
        if params['count'].isdigit():
            yql += (' limit ' + str(params['count']))
    if ('offset' in params):
        if params['offset'].isdigit():
            yql += (' offset ' + str(params['offset']))
    return yql
[Generator of YQL vespa query, to have a refine request on the vespa cluster]
In this case, the YQL depends on the search definition of the document type in the vespa cluster
Modify with risk, some parameters position are important, such as limit

Returns:
    yql [string] -- [String that select documents based on userquery
def GenerateNewsYql(params):
    '[Generator of YQL vespa query, to have a refine request on the vespa cluster]\n    In this case, the YQL depends on the search definition of the document type in the vespa cluster\n    Modify with risk, some parameters position are important, such as limit\n    \n    Returns:\n        yql [string] -- [String that select documents based on userquery\n    '
    yql = '&yql=select * from sources * where userQuery()'
    if ('source' in params):
        yql += ((' and hostsite contains " ' + params['source']) + ' "')
    if ('language' in params):
        yql += ((' and country contains "' + params['language']) + '"')
    yql += GenerateDateParamYql(params)
    if ('count' in params):
        if params['count'].isdigit():
            yql += (' limit ' + str(params['count']))
    if ('offset' in params):
        if params['offset'].isdigit():
            yql += (' offset ' + str(params['offset']))
    return yql