MatchExpression Filter in persistenceSelectorStrategy not working as expected

Problem:
I’d like to collect only the data that refer to collectionType=1 (esaProbeStatsIntervalType with OID=.1.3.6.1.4.1.2544.1.12.8.1.7.1.4) from the esaProbeStatsTable.
So I create the following simple datacollection config:

<datacollection-group xmlns="http://xmlns.opennms.org/xsd/config/datacollection" name="Adva_2544">
   <resourceType name="esaProbeStatsEntry2544" label="Adva Probes Stats" resourceLabel="${collectionType} (${index})">
      <persistenceSelectorStrategy class="org.opennms.netmgt.collection.support.PersistAllSelectorStrategy">
         <parameter key="match-expression" value="(#collectionType == '1')"/>
      </persistenceSelectorStrategy>
      <storageStrategy class="org.opennms.netmgt.collection.support.IndexStorageStrategy"/>
   </resourceType>
   <group name="adva-probe-stats-2544" ifType="all">
      <mibObj oid=".1.3.6.1.4.1.2544.1.12.8.1.7.1.4" instance="esaProbeStatsEntry2544" alias="collectionType" type="string"/>
      <mibObj oid=".1.3.6.1.4.1.2544.1.12.8.1.7.1.11" instance="esaProbeStatsEntry2544" alias="P2RLostPkts" type="counter64"/>
   </group>
   <systemDef name="ADVA 2544">
      <sysoidMask>.1.3.6.1.4.1.2544.</sysoidMask>
      <collect>
         <includeGroup>adva-probe-stats-2544</includeGroup>
      </collect>
   </systemDef>
</datacollection-group>

Unfortunately I can see from Karaf that the even metrics related to “node[Adva_2544_rob:30223].esaProbeStatsEntry2544[1.1.1.1.1.1.2]” (which refers to collectionType=2) are collected, as you can see below:

admin@opennms()> opennms:show-measurement-resources --node Adva_2544_rob:30223 --no-children

ID: node[Adva_2544_rob:30223]
Name: Adva_2544_rob:30223
Label: acc080500-edd-030223
Type: Node
Link: element/node.jsp?node=Adva_2544_rob:30223
Children:
node[Adva_2544_rob:30223].nodeSnmp[]
node[Adva_2544_rob:30223].interfaceSnmp[ACCESS_PORT_1_1_1_2-0080eabeb652]
node[Adva_2544_rob:30223].interfaceSnmp[DCN_1_1_1_1-0080eabeb650]
node[Adva_2544_rob:30223].interfaceSnmp[NETWORK_PORT_1_1_1_1-0080eabeb651]
node[Adva_2544_rob:30223].responseTime[10.252.2.237]
node[Adva_2544_rob:30223].esaProbeStatsEntry2544[1.1.1.1.1.1.1]
node[Adva_2544_rob:30223].esaProbeStatsEntry2544[1.1.1.1.1.1.2]
Attributes:
External:
Metrics:
Strings:

admin@opennms()> opennms:show-measurement-resources -r “node[Adva_2544_rob:30223].esaProbeStatsEntry2544[1.1.1.1.1.1.1]”

ID: node[Adva_2544_rob:30223].esaProbeStatsEntry2544[1.1.1.1.1.1.1]
Name: 1.1.1.1.1.1.1
Label: 1 (1.1.1.1.1.1.1)
Type: Adva Probes Stats
Link: null
Parent ID: node[Adva_2544_rob:30223]
Children:
Attributes:
External:
Metrics:
P2RLostPkts = ‘snmp:fs:Adva_2544_rob:30223:esaProbeStatsEntry2544:1.1.1.1.1.1.1:adva-probe-stats-2544’
Strings:
collectionType = ‘1’

admin@opennms()> opennms:show-measurement-resources -r “node[Adva_2544_rob:30223].esaProbeStatsEntry2544[1.1.1.1.1.1.2]”

ID: node[Adva_2544_rob:30223].esaProbeStatsEntry2544[1.1.1.1.1.1.2]
Name: 1.1.1.1.1.1.2
Label: 2 (1.1.1.1.1.1.2)
Type: Adva Probes Stats
Link: null
Parent ID: node[Adva_2544_rob:30223]
Children:
Attributes:
External:
Metrics:
P2RLostPkts = ‘snmp:fs:Adva_2544_rob:30223:esaProbeStatsEntry2544:1.1.1.1.1.1.2:adva-probe-stats-2544’
Strings:
collectionType = ‘2’

Expected outcome:
I would expect to find the only metrics related to collectionType=‘1’

OpenNMS version:
28.0

I’ve just realized that org.opennms.netmgt.collection.support.PersistAllSelectorStrategy should be replaced by org.opennms.netmgt.collectd.PersistRegexSelectorStrategy