Most models have a variety of possible names which can refer to an object. short_name, long_name, aliases, etc. A user desiring to search for a campaign based on a string will expect to see a result that is matched against any of the valid name fields.
This PR implements a list of possible valid name fields for each model and updates the search function to use these fields in the default search.
PROBLEMS:
Currently, the list of returned results in the queryset is not unique, and adding a .distinct('uuid') constraint seems to massively slow down the application.
Most models have a variety of possible names which can refer to an object.
short_name
,long_name
,aliases
, etc. A user desiring to search for a campaign based on a string will expect to see a result that is matched against any of the valid name fields.This PR implements a list of possible valid name fields for each model and updates the search function to use these fields in the default search.
PROBLEMS: Currently, the list of returned results in the queryset is not unique, and adding a
.distinct('uuid')
constraint seems to massively slow down the application.