public List<LogMessage> search( String query ) {
        String[] pcs = query.split( " +" );

        List<LogMessage> lst = new ArrayList<LogMessage>();
        
        try {

            DBObject cmd = new BasicDBObject();
            cmd.put( "fts" , _logs.getName() );
            cmd.put( "search" , query );
            
            DBObject res = _db.command( cmd );
            List results = (List)res.get( "results" );
            if ( results == null ) {
                LOG.log( Level.WARNING , "can't do fts query: " + res );
                return lst;
            }
            for ( Object raw : results ) {
                DBObject scored = (DBObject)raw;
                DBObject bucket = (DBObject)scored.get( "obj" );
                
                List messages = (List)bucket.get( "logs" );
                
                for ( Object x : messages ) {
                    DBObject msg = (DBObject)x;
                    String txt = msg.get( "msg" ).toString();

                    int idx = txt.indexOf( "PRIVMSG" );
                    if ( idx < 0 )
                        continue;

                    txt = txt.substring( idx + 7 );
                    txt = txt.substring( txt.indexOf( ":" ) + 1 ).trim();
                    
                    boolean good = false;
                    
                    for ( int i=0; i<pcs.length; i++ ) {
                        if ( txt.indexOf( pcs[i] ) >= 0 ) {
                            good = true;
                            break;
                        }
                    }

                    if ( good ) 
                        lst.add( new LogMessage( msg ) ); 
                }

            }
            
        }
        catch ( MongoException me ) {
            LOG.log( Level.WARNING , "error doing search" , me );
        }
        
        return lst;
    }