Query on secondary index not working in Java

secondary
java

#1

When I run this query I don’t get any result:

        String NAMESPACE = "**dlms**" ;
        Statement stmt = new Statement();
        String[] bins = { DlmsConstants.PB_DATA};
        stmt.setNamespace(NAMESPACE);
        stmt.setSetName(DlmsConstants.TABLE_DLMS_SECKEY);
        stmt.setIndexName(DlmsConstants.INDEX_SECKEY_NAME);
        stmt.setBinNames(bins);
        stmt.setFilters(Filter.equal(DlmsConstants.INDEX_SECKEY_BIN, devid));     
        RecordSet rs = client().query(null, stmt);

The same command does work if I change this line: NAMESPACE = “test” ;

My aerospike.conf looks like this:

namespace **test** {
  replication-factor 2
  memory-size 4G
  default-ttl 30d # 30 days, use 0 to never expire/evict.
  storage-engine memory
}

namespace **dlms** {
  replication-factor 2 
  high-water-memory-pct 60
  high-water-disk-pct 50  
  stop-writes-pct 70 
  default-ttl 0  
 
  storage-engine device {
    file  /my-dev/dbs/aerospike-data/dlms.data # Not ideal but for development purpose only
    filesize 5743895347  
    data-in-memory true 
   defrag-startup-minimum  10
  }
}

Are secondary indexes not supported with device’s as storage engines?

Is there a workaround?