When select three or more filters in the Asset Share portal, the search results section displays un-accurate results of assets that does not comply with filters.
How to remove the group.p.or = true statement from being added by default?
Example URL from DAM Portal:
https://dam.site.com/content/asset-share-commons/en/marketing.html?1_group.propertyvalues.property=.%2Fjcr%3Acontent%2Fmetadata%2Fdc%3Aformat&1_group.propertyvalues.operation=equals&1_group.propertyvalues.3_values=image%2Fpng&3_group.propertyvalues.property=.%2Fjcr%3Acontent%2Fmetadata%2Fdam%3Amarketingprojectasset&3_group.propertyvalues.operation=equals&3_group.propertyvalues.3_values=04_digital&10_group.propertyvalues.property=.%2Fjcr%3Acontent%2Fmetadata%2Fdam%3AregionalCreator&10_group.propertyvalues.operation=equals&10_group.propertyvalues.2_values=GLOBAL&orderby=%40jcr%3Acontent%2Fjcr%3AlastModified&orderby.sort=desc&layout=list&p.offset=0&p.limit=24
From logs:
Query Builder Parameters:
_12_group.1_propertyvalues.3_values = 04_digital_12_group.1_propertyvalues.property = ./jcr:content/metadata/dam:marketingprojectasset_2_group.0_path = /content/dam/projects/marketing/seasonal_2_group.1_path = /content/dam/marketing/site-assets_2_group.2_path = /content/dam/projects/emea_2_group.3_path = /content/dam/marketing/global-resources_2_group.p.or = true_4_group.mainasset = true_5_group.group.property = jcr:content/metadata/dam:exclusive_5_group.group.property.operation = not_6_group.group.p.or = true_6_group.group.property = jcr:content/metadata/prism:expirationDate_6_group.group.property.operation = not_6_group.group.relativedaterange.lowerBound = 0d_6_group.group.relativedaterange.property = jcr:content/metadata/prism:expirationDate_7_group.group.1_daterange.lowerBound = 2024-09-04T11:17:26.334773_7_group.group.1_daterange.property = jcr:content/metadata/ua:archivedDate_7_group.group.2_property = jcr:content/metadata/ua:archivedDate_7_group.group.2_property.operation = not_7_group.group.p.or = true_group.11_group.1_propertyvalues.3_values = image/png_group.11_group.1_propertyvalues.operation = equals_group.11_group.1_propertyvalues.property = ./jcr:content/metadata/dc:format_group.12_group.1_propertyvalues.operation = equals_group.13_group.1_propertyvalues.2_values = GLOBAL_group.13_group.1_propertyvalues.operation = equals_group.13_group.1_propertyvalues.property = ./jcr:content/metadata/dam:regionalCreator_group.p.or = true_orderby = @jcr:content/jcr:lastModified_orderby.sort = desc_p.guessTotal = 100_p.limit = 24_p.offset = 0_type = dam:Asset
Query Builder Parameters (formatted to be human readable):
12_group.1_propertyvalues.3_values = 04_digital
12_group.1_propertyvalues.property = ./jcr:content/metadata/dam:marketingprojectasset
2_group.0_path = /content/dam/projects/marketing/seasonal
2_group.1_path = /content/dam/marketing/site-assets
2_group.2_path = /content/dam/projects/emea
2_group.3_path = /content/dam/marketing/global-resources
2_group.p.or = true
4_group.mainasset = true
5_group.group.property = jcr:content/metadata/dam:exclusive
5_group.group.property.operation = not
6_group.group.p.or = true
6_group.group.property = jcr:content/metadata/prism:expirationDate
6_group.group.property.operation = not
6_group.group.relativedaterange.lowerBound = 0d
6_group.group.relativedaterange.property = jcr:content/metadata/prism:expirationDate
7_group.group.1_daterange.lowerBound = 2024-09-04T11:17:26.334773
7_group.group.1_daterange.property = jcr:content/metadata/ua:archivedDate
7_group.group.2_property = jcr:content/metadata/ua:archivedDate
7_group.group.2_property.operation = not
7_group.group.p.or = true
group.11_group.1_propertyvalues.3_values = image/png
group.11_group.1_propertyvalues.operation = equals
group.11_group.1_propertyvalues.property = ./jcr:content/metadata/dc:format
group.12_group.1_propertyvalues.operation = equals
group.13_group.1_propertyvalues.2_values = GLOBAL
group.13_group.1_propertyvalues.operation = equals
group.13_group.1_propertyvalues.property = ./jcr:content/metadata/dam:regionalCreator
group.p.or = true
orderby = @jcr:content/jcr:lastModified
orderby.sort = desc
p.guessTotal = 100
p.limit = 24
p.offset = 0
type = dam:Asset
Executed query statement:
_(/jcr:root/content/dam/projects/marketing/seasonal//element(*, dam:Asset)[((_x002e_/jcr:content/metadata/@dc:format = 'image/png')) and (not(jcr:content/metadata/@dam:exclusive)) and (not(jcr:content/metadata/@prism:expirationDate) or (jcr:content/metadata/@prism:expirationDate > xs:dateTime('2024-09-04T11:17:26.343Z'))) and ((jcr:content/metadata/@ua:archivedDate > xs:dateTime('2024-09-04T11:17:26.334Z')) or not(jcr:content/metadata/@ua:archivedDate)) and ((_x002e_/jcr:content/metadata/@dam:marketingprojectasset = '04_digital'))] | /jcr:root/content/dam/projects/marketing/seasonal//element(*, dam:Asset)[((_x002e_/jcr:content/metadata/@dam:regionalCreator = 'GLOBAL')) and (not(jcr:content/metadata/@dam:exclusive)) and (not(jcr:content/metadata/@prism:expirationDate) or (jcr:content/metadata/@prism:expirationDate > xs:dateTime('2024-09-04T11:17:26.343Z'))) and ((jcr:content/metadata/@ua:archivedDate > xs:dateTime('2024-09-04T11:17:26.334Z')) or not(jcr:content/metadata/@ua:archivedDate)) and ((_x002e_/jcr:content/metadata/@dam:marketingprojectasset = '04_digital'))] | /jcr:root/content/dam/marketing/site-assets//element(*, dam:Asset)[((_x002e_/jcr:content/metadata/@dc:format = 'image/png')) and (not(jcr:content/metadata/@dam:exclusive)) and (not(jcr:content/metadata/@prism:expirationDate) or (jcr:content/metadata/@prism:expirationDate > xs:dateTime('2024-09-04T11:17:26.343Z'))) and ((jcr:content/metadata/@ua:archivedDate > xs:dateTime('2024-09-04T11:17:26.334Z')) or not(jcr:content/metadata/@ua:archivedDate)) and ((_x002e_/jcr:content/metadata/@dam:marketingprojectasset = '04_digital'))] | /jcr:root/content/dam/marketing/site-assets//element(*, dam:Asset)[((_x002e_/jcr:content/metadata/@dam:regionalCreator = 'GLOBAL')) and (not(jcr:content/metadata/@dam:exclusive)) and (not(jcr:content/metadata/@prism:expirationDate) or (jcr:content/metadata/@prism:expirationDate > xs:dateTime('2024-09-04T11:17:26.343Z'))) and ((jcr:content/metadata/@ua:archivedDate > xs:dateTime('2024-09-04T11:17:26.334Z')) or not(jcr:content/metadata/@ua:archivedDate)) and ((_x002e_/jcr:content/metadata/@dam:marketingprojectasset = '04_digital'))] | /jcr:root/content/dam/projects/emea//element(*, dam:Asset)[((_x002e_/jcr:content/metadata/@dc:format = 'image/png')) and (not(jcr:content/metadata/@dam:exclusive)) and (not(jcr:content/metadata/@prism:expirationDate) or (jcr:content/metadata/@prism:expirationDate > xs:dateTime('2024-09-04T11:17:26.343Z'))) and ((jcr:content/metadata/@ua:archivedDate > xs:dateTime('2024-09-04T11:17:26.334Z')) or not(jcr:content/metadata/@ua:archivedDate)) and ((_x002e_/jcr:content/metadata/@dam:marketingprojectasset = '04_digital'))] | /jcr:root/content/dam/projects/emea//element(*, dam:Asset)[((_x002e_/jcr:content/metadata/@dam:regionalCreator = 'GLOBAL')) and (not(jcr:content/metadata/@dam:exclusive)) and (not(jcr:content/metadata/@prism:expirationDate) or (jcr:content/metadata/@prism:expirationDate > xs:dateTime('2024-09-04T11:17:26.343Z'))) and ((jcr:content/metadata/@ua:archivedDate > xs:dateTime('2024-09-04T11:17:26.334Z')) or not(jcr:content/metadata/@ua:archivedDate)) and ((_x002e_/jcr:content/metadata/@dam:marketingprojectasset = '04_digital'))] | /jcr:root/content/dam/marketing/global-resources//element(*, dam:Asset)[((_x002e_/jcr:content/metadata/@dc:format = 'image/png')) and (not(jcr:content/metadata/@dam:exclusive)) and (not(jcr:content/metadata/@prism:expirationDate) or (jcr:content/metadata/@prism:expirationDate > xs:dateTime('2024-09-04T11:17:26.343Z'))) and ((jcr:content/metadata/@ua:archivedDate > xs:dateTime('2024-09-04T11:17:26.334Z')) or not(jcr:content/metadata/@ua:archivedDate)) and ((_x002e_/jcr:content/metadata/@dam:marketingprojectasset = '04_digital'))] | /jcr:root/content/dam/marketing/global-resources//element(*, dam:Asset)[((_x002e_/jcr:content/metadata/@dam:regionalCreator = 'GLOBAL')) and (not(jcr:content/metadata/@dam:exclusive)) and (not(jcr:content/metadata/@prism:expirationDate) or (jcr:content/metadata/@prism:expirationDate > xs:dateTime('2024-09-04T11:17:26.343Z'))) and ((jcr:content/metadata/@ua:archivedDate > xs:dateTime('2024-09-04T11:17:26.334Z')) or not(jcr:content/metadata/@ua:archivedDate)) and ((_x002e_/jcr:content/metadata/@dam:marketingprojectasset = '04_digital'))]) order by jcr:content/@jcr:lastModified descending
Note that at the end of the query params Asset Share Commons adds those extra params:
group.p.or = true
orderby = @jcr:content/jcr:lastModified
orderby.sort = desc
p.guessTotal = 100
p.limit = 24
p.offset = 0
type = dam:Asset
I believe that the com.adobe.aem.commons.assetshare.search.providers.impl.QuerySearchProviderImpl is internally applying extra parameters to the Query Builder that disrupts the query creation causing un-accurate results.
The group.p.or = true statement is disrupting the facets:
Extracting facets using the Query Builder Debugger:
(
/jcr:root/content/dam/projects/marketing/seasonal//element(*, dam:Asset)
[
((_x002e_/jcr:content/metadata/@dc:format = 'image/png'))
and (not(jcr:content/metadata/@dam:exclusive))
and (not(jcr:content/metadata/@prism:expirationDate)
or (jcr:content/metadata/@prism:expirationDate > xs:dateTime('2024-09-04T11:34:49.462Z')))
and ((jcr:content/metadata/@ua:archivedDate > xs:dateTime('2024-09-04T11:17:26.334Z'))
or not(jcr:content/metadata/@ua:archivedDate))
and ((_x002e_/jcr:content/metadata/@dam:marketingprojectasset = '04_digital'))
]
|
/jcr:root/content/dam/projects/marketing/seasonal//element(*, dam:Asset)
[
((_x002e_/jcr:content/metadata/@dam:regionalCreator = 'GLOBAL'))
and (not(jcr:content/metadata/@dam:exclusive))
and (not(jcr:content/metadata/@prism:expirationDate)
or (jcr:content/metadata/@prism:expirationDate > xs:dateTime('2024-09-04T11:34:49.462Z')))
and ((jcr:content/metadata/@ua:archivedDate > xs:dateTime('2024-09-04T11:17:26.334Z'))
or not(jcr:content/metadata/@ua:archivedDate))
and ((_x002e_/jcr:content/metadata/@dam:marketingprojectasset = '04_digital'))
]
|
/jcr:root/content/dam/marketing/site-assets//element(*, dam:Asset)
[
((_x002e_/jcr:content/metadata/@dc:format = 'image/png'))
and (not(jcr:content/metadata/@dam:exclusive))
and (not(jcr:content/metadata/@prism:expirationDate)
or (jcr:content/metadata/@prism:expirationDate > xs:dateTime('2024-09-04T11:34:49.462Z')))
and ((jcr:content/metadata/@ua:archivedDate > xs:dateTime('2024-09-04T11:17:26.334Z'))
or not(jcr:content/metadata/@ua:archivedDate))
and ((_x002e_/jcr:content/metadata/@dam:marketingprojectasset = '04_digital'))
]
|
/jcr:root/content/dam/marketing/site-assets//element(*, dam:Asset)
[
((_x002e_/jcr:content/metadata/@dam:regionalCreator = 'GLOBAL'))
and (not(jcr:content/metadata/@dam:exclusive))
and (not(jcr:content/metadata/@prism:expirationDate)
or (jcr:content/metadata/@prism:expirationDate > xs:dateTime('2024-09-04T11:34:49.462Z')))
and ((jcr:content/metadata/@ua:archivedDate > xs:dateTime('2024-09-04T11:17:26.334Z'))
or not(jcr:content/metadata/@ua:archivedDate))
and ((_x002e_/jcr:content/metadata/@dam:marketingprojectasset = '04_digital'))
]
|
/jcr:root/content/dam/projects/emea//element(*, dam:Asset)
[
((_x002e_/jcr:content/metadata/@dc:format = 'image/png'))
and (not(jcr:content/metadata/@dam:exclusive))
and (not(jcr:content/metadata/@prism:expirationDate)
or (jcr:content/metadata/@prism:expirationDate > xs:dateTime('2024-09-04T11:34:49.462Z')))
and ((jcr:content/metadata/@ua:archivedDate > xs:dateTime('2024-09-04T11:17:26.334Z'))
or not(jcr:content/metadata/@ua:archivedDate))
and ((_x002e_/jcr:content/metadata/@dam:marketingprojectasset = '04_digital'))
]
|
/jcr:root/content/dam/projects/emea//element(*, dam:Asset)
[
((_x002e_/jcr:content/metadata/@dam:regionalCreator = 'GLOBAL'))
and (not(jcr:content/metadata/@dam:exclusive))
and (not(jcr:content/metadata/@prism:expirationDate)
or (jcr:content/metadata/@prism:expirationDate > xs:dateTime('2024-09-04T11:34:49.462Z')))
and ((jcr:content/metadata/@ua:archivedDate > xs:dateTime('2024-09-04T11:17:26.334Z'))
or not(jcr:content/metadata/@ua:archivedDate))
and ((_x002e_/jcr:content/metadata/@dam:marketingprojectasset = '04_digital'))
]
|
/jcr:root/content/dam/marketing/global-resources//element(*, dam:Asset)
[
((_x002e_/jcr:content/metadata/@dc:format = 'image/png'))
and (not(jcr:content/metadata/@dam:exclusive))
and (not(jcr:content/metadata/@prism:expirationDate)
or (jcr:content/metadata/@prism:expirationDate > xs:dateTime('2024-09-04T11:34:49.462Z')))
and ((jcr:content/metadata/@ua:archivedDate > xs:dateTime('2024-09-04T11:17:26.334Z'))
or not(jcr:content/metadata/@ua:archivedDate))
and ((_x002e_/jcr:content/metadata/@dam:marketingprojectasset = '04_digital'))
]
|
/jcr:root/content/dam/marketing/global-resources//element(*, dam:Asset)
[
((_x002e_/jcr:content/metadata/@dam:regionalCreator = 'GLOBAL'))
and (not(jcr:content/metadata/@dam:exclusive))
and (not(jcr:content/metadata/@prism:expirationDate)
or (jcr:content/metadata/@prism:expirationDate > xs:dateTime('2024-09-04T11:34:49.462Z')))
and ((jcr:content/metadata/@ua:archivedDate > xs:dateTime('2024-09-04T11:17:26.334Z'))
or not(jcr:content/metadata/@ua:archivedDate))
and ((_x002e_/jcr:content/metadata/@dam:marketingprojectasset = '04_digital'))
])
order by jcr:content/@jcr:lastModified descendin
)
But if removing the group.p.or = true statement, or setting it to false group.p.or = false
The facets are structured correctly and the results matches the filters:
(
/jcr:root/content/dam/projects/marketing/seasonal//element(*, dam:Asset)
[
((_x002e_/jcr:content/metadata/@dc:format = 'image/png'))
and ((_x002e_/jcr:content/metadata/@dam:regionalCreator = 'GLOBAL'))
and (not(jcr:content/metadata/@dam:exclusive))
and (not(jcr:content/metadata/@prism:expirationDate)
or (jcr:content/metadata/@prism:expirationDate > xs:dateTime('2024-09-04T11:41:10.744Z')))
and ((jcr:content/metadata/@ua:archivedDate > xs:dateTime('2024-09-04T11:17:26.334Z'))
or not(jcr:content/metadata/@ua:archivedDate))
and ((_x002e_/jcr:content/metadata/@dam:marketingprojectasset = '04_digital'))
]
|
/jcr:root/content/dam/marketing/site-assets//element(*, dam:Asset)
[
((_x002e_/jcr:content/metadata/@dc:format = 'image/png'))
and ((_x002e_/jcr:content/metadata/@dam:regionalCreator = 'GLOBAL'))
and (not(jcr:content/metadata/@dam:exclusive))
and (not(jcr:content/metadata/@prism:expirationDate)
or (jcr:content/metadata/@prism:expirationDate > xs:dateTime('2024-09-04T11:41:10.744Z')))
and ((jcr:content/metadata/@ua:archivedDate > xs:dateTime('2024-09-04T11:17:26.334Z'))
or not(jcr:content/metadata/@ua:archivedDate))
and ((_x002e_/jcr:content/metadata/@dam:marketingprojectasset = '04_digital'))
]
|
/jcr:root/content/dam/projects/emea//element(*, dam:Asset)
[
((_x002e_/jcr:content/metadata/@dc:format = 'image/png'))
and ((_x002e_/jcr:content/metadata/@dam:regionalCreator = 'GLOBAL'))
and (not(jcr:content/metadata/@dam:exclusive))
and (not(jcr:content/metadata/@prism:expirationDate)
or (jcr:content/metadata/@prism:expirationDate > xs:dateTime('2024-09-04T11:41:10.744Z')))
and ((jcr:content/metadata/@ua:archivedDate > xs:dateTime('2024-09-04T11:17:26.334Z'))
or not(jcr:content/metadata/@ua:archivedDate))
and ((_x002e_/jcr:content/metadata/@dam:marketingprojectasset = '04_digital'))
]
|
/jcr:root/content/dam/marketing/global-resources//element(*, dam:Asset)
[
((_x002e_/jcr:content/metadata/@dc:format = 'image/png'))
and ((_x002e_/jcr:content/metadata/@dam:regionalCreator = 'GLOBAL'))
and (not(jcr:content/metadata/@dam:exclusive))
and (not(jcr:content/metadata/@prism:expirationDate)
or (jcr:content/metadata/@prism:expirationDate > xs:dateTime('2024-09-04T11:41:10.744Z')))
and ((jcr:content/metadata/@ua:archivedDate > xs:dateTime('2024-09-04T11:17:26.334Z'))
or not(jcr:content/metadata/@ua:archivedDate))
and ((_x002e_/jcr:content/metadata/@dam:marketingprojectasset = '04_digital'))
])
order by jcr:content/@jcr:lastModified descendin
)
Useful reference: https://github.com/adobe/asset-share-commons/issues/239
Views
Replies
Total Likes
@pabloram23 Is this the similar issue been discussed in below post ? replacing the or condition with and, if yes please check the solution provided.
Hi @Saravanan_Dharmaraj thanks for replying. It is not the same case because the one you provided is regarding multiple options (values) in one single filter. My case is three or more different filters with one value assigned.
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies