mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-11-21 22:07:59 -05:00
add small comment
This commit is contained in:
@@ -732,8 +732,13 @@ class MediaSearch(APIView):
|
||||
media = Media.objects.filter(state="public", is_reviewed=True)
|
||||
|
||||
if query:
|
||||
# move this processing to a prepare_query function
|
||||
query = clean_query(query)
|
||||
q_parts = [q_part for q_part in query.split() if q_part not in STOP_WORDS]
|
||||
q_parts = [
|
||||
q_part.strip("y")
|
||||
for q_part in query.split()
|
||||
if q_part not in STOP_WORDS
|
||||
]
|
||||
if q_parts:
|
||||
query = SearchQuery(q_parts[0] + ":*", search_type="raw")
|
||||
for part in q_parts[1:]:
|
||||
|
||||
Reference in New Issue
Block a user