def name_only_query(q):
    d = {}

    rules = {'match': {'query': q, 'boost': 3, 'analyzer': 'standard'},
             'match': {'query': q, 'boost': 4, 'type': 'phrase'},
             'fuzzy': {'value': q, 'boost': 2, 'prefix_length': 4},
             'startswith': {'value': q, 'boost': 1.5}}
    for k, v in rules.iteritems():
        for field in ('name', 'slug', 'authors'):
            d[(field, k) % '%s__%s'] = v

    analyzer = get_locale_analyzer(translation.get_language())
    if analyzer:
        d['name_%s__match' % analyzer] = {'query': q, 'boost': 2.5,
                                          'analyzer': analyzer}
    return d
dataset/ETHPy150Open mozilla/addons-server/src/olympia/search/views.py/name_only_query/swapped operands of `%`