@handle_search_errors
def search_share():
    tick = time.time()
    results = {}

    count = request.args.get('count') is not None
    raw = request.args.get('raw') is not None
    version = request.args.get('v')
    if version:
        index = settings.SHARE_ELASTIC_INDEX_TEMPLATE.format(version)
    else:
        index = settings.SHARE_ELASTIC_INDEX

    if request.method == 'POST':
        query = request.get_json()
    elif request.method == 'GET':
        query = build_query(
            request.args.get('q', '*'),
            request.args.get('from', 0),
            request.args.get('size', 10),
            sort=request.args.get('sort')
        )

    if count:
        results = search.count_share(query, index=index)
    else:
        results = search.search_share(query, raw, index=index)

    results['time'] = round(tick - time.time(), 2)
    return results
dataset/ETHPy150Open CenterForOpenScience/osf.io/website/search/views.py/search_share/swapped operands of `-`