1
0
mirror of https://github.com/djohnlewis/stackdump synced 2024-12-04 23:17:37 +00:00

Query is now automatically modified to default to ANDing keywords together, unless another operator is specified in the query string.

This commit is contained in:
Samuel Lai 2012-02-11 16:17:40 +11:00
parent 7e87726b74
commit 101e36d9e0

View File

@ -453,6 +453,8 @@ def perform_search(site_key=None):
# this query string contains any special bits we add that we don't want
# the user to see.
int_query = query
# force keywords to default to being ANDed, instead of ORed.
int_query = '{!lucene q.op=AND}' + query
if site_key:
int_query += ' AND siteKey:%s' % site_key