

def escape_for_lqs_term(self):
    if (self in ['AND', 'OR', 'NOT', '']):
        return ('"%s"' % self)
    chars = []
    for c in self.chars:
        if (isinstance(c, basestring) and (c in self.lucene_special_chars)):
            chars.append(('\\%s' % c))
        else:
            chars.append(('%s' % c))
    return ''.join(chars)

dataset/ETHPy150Open tow/sunburnt/sunburnt/strings.py SolrString.escape_for_lqs_term/original