Expand my Community achievements bar.

SOLVED

Custom Search Facets Predicate

Avatar

Level 10

I have been referring to https://docs.adobe.com/docs/en/aem/6-1/administer/content/assets/custom-search-facets.html, and i wonder if we could actually have a predicate for a check where the property does not exist?

1 Accepted Solution

Avatar

Correct answer by
Level 10
HI Nicole, you can use custom Predicates in aem to search JCR. There are not too many community articles that show this API IN ACTION.  One that does and will point you in right direction is this one. https://helpx.adobe.com/experience-manager/using/creating-custom-cq-tree.html Notice the code in the servlet. We need more examples of this API in action.

View solution in original post

7 Replies

Avatar

Correct answer by
Level 10
HI Nicole, you can use custom Predicates in aem to search JCR. There are not too many community articles that show this API IN ACTION.  One that does and will point you in right direction is this one. https://helpx.adobe.com/experience-manager/using/creating-custom-cq-tree.html Notice the code in the servlet. We need more examples of this API in action.

Avatar

Level 10
You can also use JCR API and call hasproperty that returns a boolean.   

Avatar

Level 10

smacdonald2008 wrote...

HI Nicole, you can use custom Predicates in aem to search JCR. There are not too many community articles that show this API IN ACTION. One that does and will point you in right direction is this one. https://helpx.adobe.com/experience-manager/using/creating-custom-cq-tree.html Notice the code in the servlet. We need more examples of this API in action.

 

Hey Scott,

I am trying to customize the http://localhost:4502/assets.html/content/dam search functionality, by following the link pasted above, i have a way to create a predicate by using the hidden field predicate, to search for assets that do not have the property "xyz", but i cant have conditions to search for an asset with the property and without the property together while searching for assets. I could create another form, but not sure how to hook it up to the search option

Avatar

Level 10
If you create another form,  why not make a Restful call to backend service?

Avatar

Level 10
I am travelling from Europe to North America. If this is not answered, I can setup a connect session to dig into this and help you find a good solution.   

Avatar

Level 10

smacdonald2008 wrote...

I am travelling from Europe to North America. If this is not answered, I can setup a connect session to dig into this and help you find a good solution.

 

Thank you Scott, will try and update on the progress