The umbraco search uses examine which in turn uses lucene.
The Search method in Umbraco.ContentQuery will create a query over all the fields in the index, those fields are based on all fields in all document types.
If you have alot of doctypes and fields then that list will get pretty big
When creating lucene queries there is limit on number of clauses in a query. So in your case it looks like its reaching that limit.
This can be changed but it requires code todo it. However probably better round this is instead of using Umbraco.ContentQuery.Search create your own examine query and give the fields you want to search over. This will give you less clauses and thus you will not hit that limit.
True story I broke our.umbraco about 2 years by submitting a PR to examine where it by passed max clause count that PR had to be reverted as our umbraco started giving this same error.
Getting maxClauseCount is set to 1024 Error for Umbraco.ContentQuery.Search(@text, null)
Hi Team,
I'm getting below issue while using Umbraco.ContentQuery.Search(@query, null).
Please suggest how to resolve.
The umbraco search uses examine which in turn uses lucene.
The Search method in Umbraco.ContentQuery will create a query over all the fields in the index, those fields are based on all fields in all document types.
If you have alot of doctypes and fields then that list will get pretty big
When creating lucene queries there is limit on number of clauses in a query. So in your case it looks like its reaching that limit.
This can be changed but it requires code todo it. However probably better round this is instead of using Umbraco.ContentQuery.Search create your own examine query and give the fields you want to search over. This will give you less clauses and thus you will not hit that limit.
True story I broke our.umbraco about 2 years by submitting a PR to examine where it by passed max clause count that PR had to be reverted as our umbraco started giving this same error.
Regards
Ismail
Solution for Umbraco 12+: @using Lucene.Net.Search
@{
}
is working on a reply...