def smart_search_pool(self):
search_options = {}<EOL>if '<STR_LIT>' in request.json:<EOL><INDENT>search_options['<STR_LIT>'] = request.json['<STR_LIT>']<EOL><DEDENT>if '<STR_LIT>' in request.json:<EOL><INDENT>search_options['<STR_LIT>'] = request.json['<STR_LIT>']<EOL><DEDENT>if '<STR_LIT>' in request.json:<EOL><INDENT>search_options['<STR_LIT>'] = request.json['<STR_LIT>']<EOL><DEDENT>try:<EOL><INDENT>result = Pool.smart_search(request.json['<STR_LIT>'],<EOL>search_options<EOL>)<EOL>del result['<STR_LIT:error>']<EOL><DEDENT>except NipapError as e:<EOL><INDENT>return json.dumps({'<STR_LIT:error>': <NUM_LIT:1>, '<STR_LIT:message>': e.args, '<STR_LIT:type>': type(e).__name__})<EOL><DEDENT>return json.dumps(result, cls=NipapJSONEncoder)<EOL>
Perform a smart pool search.

            The "smart" search function tries extract a query from
            a text string. This query is then passed to the search_pool
            function, which performs the search.