Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
Add TODO to improve search querying of indexed fields, re #44
Browse files Browse the repository at this point in the history
  • Loading branch information
jmurty committed Nov 2, 2016
1 parent 984e6cf commit ed2760b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions icekit/utils/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ def get_searchqueryset(self, query):
Add non-document fields to search query set so a) they are searched
when querying, and b) any customisations like `boost` are applied.
"""
# TODO Find a way to detect all indexed fields across models and
# automatically add them to this filter, instead of requiring explicit
# naming of every indexed field.
return self.searchqueryset.filter(
SQ(content=AutoQuery(query)) | # Search `text` document
SQ(title=AutoQuery(query)) |
Expand Down

0 comments on commit ed2760b

Please sign in to comment.