function validateSearchParams(searchParams) {
    let ast;
    try {
        // allow using 'replicationStatus' as search param to increase
        // ease of use, pending metadata search rework
        // eslint-disable-next-line no-param-reassign
        searchParams = searchParams.replace(
            'replication-status', 'replicationInfo.status');
        ast = parser.parse(searchParams);
    } catch (e) {
        if (e) {
            return {
                error: errorInstances.InvalidArgument
                .customizeDescription('Invalid sql where clause ' +
                'sent as search query'),
            };
        }
    }
    const possibleAttributes = objModel.getAttributes();
    const invalidAttribute = _validateTree(ast, possibleAttributes);
    if (invalidAttribute) {
        return {
            error: errorInstances.InvalidArgument
                .customizeDescription('Search param ' +
                `contains unknown attribute: ${invalidAttribute}`) };
    }
    return {
        ast,
    };
}
validateSearchParams - validate value of ?search= in request
@param  {string} searchParams - value of search params in request
 which should be jsu sql where clause
For metadata: x-amz-meta-color=\"blue\"
For tags: tags.x-amz-meta-color=\"blue\"
For replication status : replication-status=\"PENDING\"
For any other attribute: `content-length`=5
@return {undefined | error} undefined if validates or arsenal error if not