How to change the settings of apache lucene in AEM 5.6.1? | Community
Skip to main content
mikezooz
Level 4
October 16, 2015
Solved

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

  • October 16, 2015
  • 4 replies
  • 2342 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by JustinEd3

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

4 replies

JustinEd3Adobe EmployeeAccepted solution
Adobe Employee
October 16, 2015

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

edubey
Level 10
October 16, 2015
mikezooz
mikezoozAuthor
Level 4
October 16, 2015

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.

Adobe Employee
October 16, 2015

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.