Attribute attr = record.getAttributes().get( attrId );
Attribute attr = AttributeUtils.getAttribute( record.getAttributes(), attributeTypeRegistry.lookup( node.getAttribute() ) );
    private boolean evalGreater( SimpleNode node, IndexRecord record, boolean isGreater ) throws NamingException    {        String attrId = node.getAttribute();        BigInteger id = record.getEntryId();        if ( db.hasUserIndexOn( attrId ) )        {            Index idx = db.getUserIndex( attrId );            if ( isGreater )            {                return idx.hasValue( node.getValue(), id, true );            }            return idx.hasValue( node.getValue(), id, false );        }        // resusitate entry if need be        if ( null == record.getAttributes() )        {            record.setAttributes( db.lookup( id ) );        }        // get the attribute associated with the node         Attribute attr = record.getAttributes().get( attrId );        // If we do not have the attribute just return false        if ( null == attr )        {            return false;        }        /*         * We need to iterate through all values and for each value we normalize         * and use the comparator to determine if a match exists.         */        Normalizer normalizer = getNormalizer( attrId );        Comparator comparator = getComparator( attrId );        Object filterValue = node.getValue();        NamingEnumeration list = attr.getAll();        /*         * Cheaper to not check isGreater in one loop - better to separate         * out into two loops which you choose to execute based on isGreater         */        if ( isGreater )        {            while ( list.hasMore() )            {                Object value = normalizer.normalize( list.next() );                // Found a value that is greater than or equal to the ava value                if ( 0 >= comparator.compare( value, filterValue ) )                {                    return true;                }            }        }        else        {            while ( list.hasMore() )            {                Object value = normalizer.normalize( list.next() );                // Found a value that is less than or equal to the ava value                if ( 0 <= comparator.compare( value, filterValue ) )                {                    return true;                }            }        }        // no match so return false        return false;    }