mirror of
https://github.com/mediacms-io/mediacms.git
synced 2024-12-26 16:58:47 +01:00
add small comment
This commit is contained in:
parent
9339443ddf
commit
47936b8be7
@ -117,6 +117,7 @@ class SearchRSSFeed(Feed):
|
||||
elif tag:
|
||||
media = media.filter(tags__title=tag)
|
||||
elif query:
|
||||
# same as on files.views.MediaSearch: move this processing to a prepare_query function
|
||||
query = helpers.clean_query(query)
|
||||
q_parts = [
|
||||
q_part.strip("y")
|
||||
|
@ -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:]:
|
||||
|
Loading…
Reference in New Issue
Block a user