.setTypes(UserIndexDefinition.TYPE_USER)
.setQuery(QueryBuilders.boolQuery()
.should(QueryBuilders.termQuery(UserIndexDefinition.FIELD_LOGIN, scmAccount))
.should(QueryBuilders.termQuery(UserIndexDefinition.FIELD_EMAIL, scmAccount))
.should(QueryBuilders.termQuery(UserIndexDefinition.FIELD_SCM_ACCOUNTS, scmAccount)))
<BUG>.setSize(1);
</BUG>
SearchHit[] result = request.get().getHits().getHits();
if (result.length == 1) {
return new UserDoc(result[0].sourceAsMap());

.setTypes(UserIndexDefinition.TYPE_USER)
.setQuery(QueryBuilders.boolQuery()
.should(QueryBuilders.termQuery(UserIndexDefinition.FIELD_LOGIN, scmAccount))
.should(QueryBuilders.termQuery(UserIndexDefinition.FIELD_EMAIL, scmAccount))
.should(QueryBuilders.termQuery(UserIndexDefinition.FIELD_SCM_ACCOUNTS, scmAccount)))
.setSize(2);
SearchHit[] result = request.get().getHits().getHits();
if (result.length == 1) {
return new UserDoc(result[0].sourceAsMap());
