@requires_auth<EOL><INDENT>def smart_search_prefix(self, args):<DEDENT>
try:<EOL><INDENT>res = self.nip.smart_search_prefix(args.get('<STR_LIT>'),<EOL>args.get('<STR_LIT>'), args.get('<STR_LIT>') or {},<EOL>args.get('<STR_LIT>'))<EOL>for prefix in res['<STR_LIT:result>']:<EOL><INDENT>prefix = _mangle_prefix(prefix)<EOL><DEDENT>return res<EOL><DEDENT>except (AuthError, NipapError) as exc:<EOL><INDENT>self.logger.debug(unicode(exc))<EOL>raise Fault(exc.error_code, unicode(exc))<EOL><DEDENT>
Perform a smart search.

            Valid keys in the `args`-struct:

            * `auth` [struct]
                Authentication options passed to the :class:`AuthFactory`.
            * `query_string` [string]
                The search string.
            * `search_options` [struct]
                Options for the search query, such as limiting the number
                of results returned.
            * `extra_query` [struct]
                Extra search terms, will be AND:ed together with what is
                extracted from the query string.

            Returns a struct containing search result, interpretation of the
            query string and the search options used.

            Certain values are casted from numbers to strings because XML-RPC
            simply cannot handle anything bigger than an integer.