Skip to content

Commit bc31287

Browse files
committed
Filter by searchable in Elastic Search
1 parent d427177 commit bc31287

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,8 @@ defaultUserQuery searcher mSearcherTeamId teamSearchInfo (normalized -> term') =
220220
ES.boolQueryMustNotMatch = [termQ "handle" term']
221221
}
222222
],
223-
ES.boolQueryShouldMatch = [ES.QueryExistsQuery (ES.FieldName "handle")]
223+
ES.boolQueryShouldMatch = [ES.QueryExistsQuery (ES.FieldName "handle")],
224+
ES.boolQueryFilter = [ ES.Filter $ ES.TermQuery (ES.Term "searchable" "true") Nothing ]
224225
}
225226
-- This reduces relevance on users not in team of search by 90% (no
226227
-- science behind that number). If the searcher is not part of a team the

0 commit comments

Comments
 (0)