Skip to content

Commit 12de58b

Browse files
committed
Don't do two searches
1 parent 7308daf commit 12de58b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

readthedocs/search/documents.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ def get_es_query(cls, query):
105105

106106
# Need to search for both 'AND' and 'OR' operations
107107
# The score of AND should be higher as it satisfies both OR and AND
108-
for operator in ['AND', 'OR']:
108+
for operator in ['OR']:
109+
# TODO: readd this, testing removal for performance
110+
# for operator in ['AND', 'OR']:
109111
query_string = SimpleQueryString(query=query, fields=cls.search_fields,
110112
default_operator=operator)
111113
all_queries.append(query_string)

0 commit comments

Comments
 (0)