code: public static boolean indexSearchEnabled(final String persistenceUnit, final KunderaMetadata kunderaMetadata)
      {
          PersistenceUnitMetadata puMetadata = KunderaMetadataManager.getPersistenceUnitMetadata(kunderaMetadata,
                  persistenceUnit);
          String clientFactoryName = puMetadata != null ? puMetadata
                  .getProperty(PersistenceProperties.KUNDERA_CLIENT_FACTORY) : null;
          return !(Constants.REDIS_CLIENT_FACTORY.equalsIgnoreCase(clientFactoryName));
  
      }
docs: Index based search has to be optional, ideally need to register a
  callback in case index persistence/search etc is optional.
  
  @param persistenceUnit
  persistence unit
  
  @return true, if index based search is enabled.