HttpServer.LOG.debug( e.toString(  ) ); e.printStackTrace(  );
HttpServer.LOG.debug( e.toString(  ), e );
    protected String search( String query, int howmany, int start,                             boolean printSummary, boolean indent,                             String stylesheet                             ) {        String result = null;        try {            XPathLexer lexer = new XPathLexer( new StringReader( query ) );            DocumentSet docs = new DocumentSet(  );            parser = new XPathParser( broker.getBrokerPool(), user, lexer );            PathExpr expr = new PathExpr( broker.getBrokerPool() );            parser.expr( expr );            HttpServer.LOG.info( "query: " + expr.pprint(  ) );            if ( parser.foundErrors(  ) )                return formatErrorMsg( parser.getErrorMsg(  ), SYNTAX_ERROR );            long startTime = System.currentTimeMillis(  );            DocumentSet ndocs = expr.preselect(  );            if ( ndocs.getLength(  ) == 0 )                result = formatErrorMsg( "nothing found", OK );            else {                Value resultValue = expr.eval( ndocs, null, null );                long queryTime = System.currentTimeMillis(  ) - startTime;                HttpServer.LOG.debug( "evaluation took " + queryTime + "ms." );                startTime = System.currentTimeMillis(  );                broker.setRetrvMode( RelationalBroker.PRELOAD );                switch ( resultValue.getType(  ) ) {                case Value.isNodeList:                    NodeList resultSet = resultValue.getNodeList(  );                    if ( printSummary )                        result = printSummary( resultSet, queryTime );                    else                        result =                            printAll( resultSet, howmany, start, queryTime,                                      indent, stylesheet                                      );                    break;                default:                    ValueSet valueSet = resultValue.getValueSet(  );                    result = printValues( valueSet, howmany, start );                    break;                }                broker.setRetrvMode( RelationalBroker.SINGLE );            }        } catch ( Exception e ) {            HttpServer.LOG.debug( e.toString(  ) );            e.printStackTrace(  );            result = formatErrorMsg( e.toString(  ), UNKNOWN_ERROR );        }        return result;    }