def smart_search_pool(self, auth, query_str, search_options=None, extra_query=None):
if search_options is None:<EOL><INDENT>search_options = {}<EOL><DEDENT>self._logger.debug("<STR_LIT>" % query_str)<EOL>success, query = self._parse_pool_query(query_str)<EOL>if not success:<EOL><INDENT>return {<EOL>'<STR_LIT>': query,<EOL>'<STR_LIT>': search_options,<EOL>'<STR_LIT:result>': [],<EOL>'<STR_LIT:error>': True,<EOL>'<STR_LIT>': '<STR_LIT>'<EOL>}<EOL><DEDENT>if extra_query is not None:<EOL><INDENT>query = {<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': query,<EOL>'<STR_LIT>': extra_query<EOL>}<EOL><DEDENT>self._logger.debug("<STR_LIT>" % unicode(query))<EOL>search_result = self.search_pool(auth, query, search_options)<EOL>search_result['<STR_LIT>'] = query<EOL>search_result['<STR_LIT:error>'] = False<EOL>return search_result<EOL>
Perform a smart search on pool list.

            * `auth` [BaseAuth]
                AAA options.
            * `query_str` [string]
                Search string
            * `search_options` [options_dict]
                Search options. See :func:`search_pool`.
            * `extra_query` [dict_to_sql]
                Extra search terms, will be AND:ed together with what is
                extracted from the query string.

            Return a dict with three elements:
                * :attr:`interpretation` - How the query string was interpreted.
                * :attr:`search_options` - Various search_options.
                * :attr:`result` - The search result.

                The :attr:`interpretation` is given as a list of dicts, each
                explaining how a part of the search key was interpreted (ie. what
                pool attribute the search operation was performed on).

                The :attr:`result` is a list of dicts containing the search result.

            The smart search function tries to convert the query from a text
            string to a `query` dict which is passed to the
            :func:`search_pool` function.  If multiple search keys are
            detected, they are combined with a logical AND.

            It will basically just take each search term and try to match it
            against the name or description column with regex match.

            See the :func:`search_pool` function for an explanation of the
            `search_options` argument.

            This is the documentation of the internal backend function. It's
            exposed over XML-RPC, please also see the XML-RPC documentation for
            :py:func:`nipap.xmlrpc.NipapXMLRPC.smart_search_pool` for full
            understanding.