diff --git a/caluma/caluma_form/filters.py b/caluma/caluma_form/filters.py index f1bdc9539..5d20097ce 100644 --- a/caluma/caluma_form/filters.py +++ b/caluma/caluma_form/filters.py @@ -277,9 +277,17 @@ def convert_meta_value_field(field): class SearchLookupMode(Enum): + """ + Lookup used in SearchAnswersFilterType. + + Keep in mind that the SearchAnswer filter operates on a word-by-word basis. + This defines the lookup used for every single word. + """ + STARTSWITH = "startswith" CONTAINS = "icontains" TEXT = "search" + EXACT_WORD = "exact" class SearchAnswersFilterType(InputObjectType): @@ -289,7 +297,7 @@ class SearchAnswersFilterType(InputObjectType): You may pass in a list of question slugs and/or a list of form slugs to define which answers to search. If you pass in one or more forms, answers to the questions in that form will be searched. If you pass in one or more question - slug, the corresponding answers are searched. If you pass both, a superset + slugs, the corresponding answers are searched. If you pass both, a superset of both is searched (ie. they do not limit each other). """ diff --git a/caluma/tests/__snapshots__/test_schema.ambr b/caluma/tests/__snapshots__/test_schema.ambr index 374b53d25..cd64e5396 100644 --- a/caluma/tests/__snapshots__/test_schema.ambr +++ b/caluma/tests/__snapshots__/test_schema.ambr @@ -2914,7 +2914,7 @@ You may pass in a list of question slugs and/or a list of form slugs to define which answers to search. If you pass in one or more forms, answers to the questions in that form will be searched. If you pass in one or more question - slug, the corresponding answers are searched. If you pass both, a superset + slugs, the corresponding answers are searched. If you pass both, a superset of both is searched (ie. they do not limit each other). """ input SearchAnswersFilterType { @@ -2924,10 +2924,17 @@ lookup: SearchLookupMode } + """ + Lookup used in SearchAnswersFilterType. + + Keep in mind that the SearchAnswer filter operates on a word-by-word basis. + This defines the lookup used for every single word. + """ enum SearchLookupMode { STARTSWITH CONTAINS TEXT + EXACT_WORD } type SelectedOption {