umco / umbraco-ezsearch

A simple search package for Umbraco
https://our.umbraco.org/projects/website-utilities/ezsearch
MIT License
6 stars 10 forks source link

Strange Error re maxClauseCount is set to 1024 #20

Open bobi33 opened 7 years ago

bobi33 commented 7 years ago

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 commented 6 months ago

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

@{

BooleanQuery.MaxClauseCount = Int32.MaxValue;

}