backend/core/user/search.js
Function _search
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _search(options, callback) {
options.limit = +options.limit || CONSTANTS.USERS_SEARCH_DEFAULT_LIMIT;
options.offset = +options.offset || CONSTANTS.USERS_SEARCH_DEFAULT_OFFSET;
if (!options.search) {
Function _getElasticsearchMustNotQuery
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _getElasticsearchMustNotQuery(options) {
const result = {
bool: {
should: [{
terms: {