Expand my Community achievements bar.

SOLVED

LuceneIndexProvider booleanClauseLimit value

Avatar

Level 2

I have a collection which has more than 1024 assets, this collections is read using the query.
If the collection contains more the 1024 assets in it, the query is returned as blank. if it contains 1024 or less assets, the collection would work fine.

When I try to change the booleanClauseLimit value to 2048, all the collections are working fine.
Attaching the config for reference, 

ashwinissrinivas_0-1685008161693.png


How to change this value via code? Is it recommended.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @ashwinissrinivas ,

 

Changing too much beyond the limit will impact the performance. 2048 is fine but here we are postponing the issue to the future. (Similar issues can occur once the clause limit exceeds more than 2048).
The right limit also seems to be debated in the Lucene community itself when you look at the below thread.
https://issues.apache.org/jira/browse/LUCENE-4835 

Changing the number is not a proper solution I would say. Rather make queries more efficient with indexing. Also, you can monitor the query performance with the below tool .

https://experienceleague.adobe.com/docs/experience-manager-65/deploying/deploying/queries-and-indexi... 
https://experienceleague.adobe.com/docs/experience-manager-65/deploying/practices/best-practices-for... 


http://localhost:4502/libs/granite/operations/content/diagnosistools/queryPerformance.html 

View solution in original post

3 Replies

Avatar

Community Advisor

Hi @ashwinissrinivas ,

Create a config file "org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexProviderService.config" under 
/apps/<proj-name>/config and set a property booleanClauseLimit. 

Editing the configs from the system console will create a config file in the below path. You can copy the file to and it under the project config folder, change the values accordingly  /apps/system/config/org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexProviderService.config

 

You can refer to the below blog for more details about creating OSGI configuration. 
https://computer-lords.blogspot.com/2021/12/adobe-experience-manager-configure-osgi.html 

Avatar

Level 2

Hi @Vaibhavi_J ,

Thank you for the response, however can you please confirm that 2048 value for booleanClauseLimit can impact performance of other queries? Also, is 1024 an optimum value and not recommended to be changed?

Avatar

Correct answer by
Community Advisor

Hi @ashwinissrinivas ,

 

Changing too much beyond the limit will impact the performance. 2048 is fine but here we are postponing the issue to the future. (Similar issues can occur once the clause limit exceeds more than 2048).
The right limit also seems to be debated in the Lucene community itself when you look at the below thread.
https://issues.apache.org/jira/browse/LUCENE-4835 

Changing the number is not a proper solution I would say. Rather make queries more efficient with indexing. Also, you can monitor the query performance with the below tool .

https://experienceleague.adobe.com/docs/experience-manager-65/deploying/deploying/queries-and-indexi... 
https://experienceleague.adobe.com/docs/experience-manager-65/deploying/practices/best-practices-for... 


http://localhost:4502/libs/granite/operations/content/diagnosistools/queryPerformance.html