Skip to content

Commit 671e93a

Browse files
committed
fixup! Add query param to Brig
1 parent 6184162 commit 671e93a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libs/wire-subsystems/src/Wire/IndexedUserStore/ElasticSearch.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,11 @@ defaultUserQuery searcher mSearcherTeamId teamSearchInfo (normalized -> term') =
223223
}
224224
],
225225
ES.boolQueryShouldMatch = [ES.QueryExistsQuery (ES.FieldName "handle")],
226+
-- The following matches both where searchable is true
227+
-- or where the field is missing. There didn't seem to
228+
-- be a more readable way to express
229+
-- "not(exists(searchable) or searchable = true" in
230+
-- Elastic Search.
226231
ES.boolQueryMustNotMatch = [ES.TermQuery (ES.Term "searchable" "false") Nothing]
227232
}
228233
-- This reduces relevance on users not in team of search by 90% (no

0 commit comments

Comments
 (0)