synapse/storage/user_directory.py
def _parse_query_sqlite(search_term):
    """Takes a plain unicode string from the user and converts it into a form
    that can be passed to database.
    We use this so that we can add prefix matching, which isn't something
    that is supported by default.

    We specifically add both a prefix and non prefix matching term so that
    exact matches get ranked higher.
    """

    # Pull out the individual words, discarding any non-word characters.
    results = re.findall(r"([\w\-]+)", search_term, re.UNICODE)
    return " & ".join("(%s* OR %s)" % (result, result,) for result in results)
Takes a plain unicode string from the user and converts it into a form
    that can be passed to database.
    We use this so that we can add prefix matching, which isn't something
    that is supported by default.

    We specifically add both a prefix and non prefix matching term so that
    exact matches get ranked higher.
    
Takes a plain unicode string from the user and converts it into a form
that can be passed to database.
We use this so that we can add prefix matching, which isn't something
that is supported by default.

We specifically add both a prefix and non prefix matching term so that
exact matches get ranked higher.
Takes a plain unicode string from the user and converts it into a form that can be passed to database . We use this so that we can add prefix matching which isn ' t something that is supported by default . We specifically add both a prefix and non prefix matching term so that exact matches get ranked higher .
def _parse_query_sqlite(search_term):
    results = re.findall(r"([\w\-]+)", search_term, re.UNICODE)
    return " & ".join("(%s* OR %s)" % (result, result,) for result in results)
def _parse_query_sqlite ( search_term ) : results = re . findall ( r"([\w\-]+)" , search_term , re . UNICODE ) return " & " . join ( "(%s* OR %s)" % ( result , result , ) for result in results )
Takes a plain unicode string from the user and converts it into a form
that can be passed to database.
Takes a plain unicode string from the user and converts it into a form that can be passed to database .
"""Takes a plain unicode string from the user and converts it into a form
    that can be passed to database.
    We use this so that we can add prefix matching, which isn't something
    that is supported by default.

    We specifically add both a prefix and non prefix matching term so that
    exact matches get ranked higher.
    """ # Pull out the individual words, discarding any non-word characters.
search_term