Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

How to change the settings of apache lucene in AEM 5.6.1?

Avatar

Level 4

Hi All,

The current behavior of Content finder is display the assets in the order of last modified date. i want to change it into alpha numeric format.

i referred in online and got to know that, apache lucene is indexing only on last modified date of the assets which is present in DAM.

i want to change the configuration of  apache lucene from last modified date into name or title of the assets.

please help me how to proceed.  ,  

Thanks,

Michael

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi,

This does not require reconfiguring Lucene. All you need to do is modify the Content Finder tab (/libs/wcm/extensions/contentfinder/images.js in this case). Specifically, what you would do is modify the JavaScript to add "order:jcr:content/metadata/dc:title" to the submitted query term. You can also review http://jackrabbit.apache.org/api/2.1/org/apache/jackrabbit/commons/query/GQL.html for a description of the query language used here.

In some complex cases, you may find that GQL is not sufficiently flexible. In which case, you might want to look at http://adobe-consulting-services.github.io/acs-aem-commons/features/contentfinder-querybuilder.html

Regards,

Justin

View solution in original post

4 Replies

Avatar

Correct answer by
Employee

Hi,

This does not require reconfiguring Lucene. All you need to do is modify the Content Finder tab (/libs/wcm/extensions/contentfinder/images.js in this case). Specifically, what you would do is modify the JavaScript to add "order:jcr:content/metadata/dc:title" to the submitted query term. You can also review http://jackrabbit.apache.org/api/2.1/org/apache/jackrabbit/commons/query/GQL.html for a description of the query language used here.

In some complex cases, you may find that GQL is not sufficiently flexible. In which case, you might want to look at http://adobe-consulting-services.github.io/acs-aem-commons/features/contentfinder-querybuilder.html

Regards,

Justin

Avatar

Level 4

justin_at_adobe wrote...

Hi,

This does not require reconfiguring Lucene. All you need to do is modify the Content Finder tab (/libs/wcm/extensions/contentfinder/images.js in this case). Specifically, what you would do is modify the JavaScript to add "order:jcr:content/metadata/dc:title" to the submitted query term. You can also review http://jackrabbit.apache.org/api/2.1/org/apache/jackrabbit/commons/query/GQL.html for a description of the query language used here.

In some complex cases, you may find that GQL is not sufficiently flexible. In which case, you might want to look at http://adobe-consulting-services.github.io/acs-aem-commons/features/contentfinder-querybuilder.html

Regards,

Justin

 

 

Hi Justin,

 

Thanks for the reply.

I have tried ""order:jcr:content/metadata/dc:title" its not working.

can you suggest any other solution.

Avatar

Employee

To be clear, there should be a space between the search term and the "order" bit.

But assuming you're doing that, I don't know why that wouldn't be working. You can try turning on debug logging for the logger org.apache.jackrabbit.core.query. This should allow you to see the translated XPath query.