mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-01-27 17:47:02 -05:00
Tweak search query
This commit is contained in:
parent
7233341eac
commit
02a6108235
@ -333,9 +333,9 @@ def _parse_query(database_engine, search_term):
|
|||||||
results = re.findall(r"([\w\-]+)", search_term, re.UNICODE)
|
results = re.findall(r"([\w\-]+)", search_term, re.UNICODE)
|
||||||
|
|
||||||
if isinstance(database_engine, PostgresEngine):
|
if isinstance(database_engine, PostgresEngine):
|
||||||
return " & ".join("%s:* & %s" % (result, result,) for result in results)
|
return " & ".join("(%s:* | %s)" % (result, result,) for result in results)
|
||||||
elif isinstance(database_engine, Sqlite3Engine):
|
elif isinstance(database_engine, Sqlite3Engine):
|
||||||
return " & ".join("%s* & %s" % (result, result,) for result in results)
|
return " & ".join("(%s* | %s)" % (result, result,) for result in results)
|
||||||
else:
|
else:
|
||||||
# This should be unreachable.
|
# This should be unreachable.
|
||||||
raise Exception("Unrecognized database engine")
|
raise Exception("Unrecognized database engine")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user