Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange Error re maxClauseCount is set to 1024 #20

Open
bobi33 opened this issue Mar 12, 2017 · 1 comment
Open

Strange Error re maxClauseCount is set to 1024 #20

bobi33 opened this issue Mar 12, 2017 · 1 comment

Comments

@bobi33
Copy link

bobi33 commented Mar 12, 2017

I am receiving the following error:

maxClauseCount is set to 1024
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Lucene.Net.Search.BooleanQuery+TooManyClauses: maxClauseCount is set to 1024

Source Error:

Line 111: }
Line 112:
Line 113: var criteria2 = criteria.RawQuery(query.ToString());
Line 114:
Line 115: var results = searcher.Search(criteria2)

It happens when the search query is more than one term.

@landlogicit
Copy link

Solution for Umbraco 12+:
@using Lucene.Net.Search

@{

BooleanQuery.MaxClauseCount = Int32.MaxValue;

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants