I am receiving the following error with ezsearch when the search query is more than one term.:
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)
I did manage to solve the issue by renaming a lot of my property aliases to generic names, rather than specific ones. As such, calling the property aliases in ezSearch was less cumbersome, since there were less specific property aliases to search, and thus no more maxclause issues.
Eg: instead of pAlias1, pAlias2, and pAlias3, I would give all of those pAlias (if they were generally related in some way). I would then call pAlias instead of the specific aforementioned ones.
Search error re maxClauseCount is set to 1024
I am receiving the following error with ezsearch when the search query is more than one term.:
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)
Any ideas as to how to fix this?
Hi Bobi, have you ever managed to solve your issue? I'm having the same problem.
Guys,
This is lucene set limit. How big is your search term? Bit more information about it here https://stackoverflow.com/questions/1534789/help-needed-figuring-out-reason-for-maxclausecount-is-set-to-1024-error
Hi Justyna,
I did manage to solve the issue by renaming a lot of my property aliases to generic names, rather than specific ones. As such, calling the property aliases in ezSearch was less cumbersome, since there were less specific property aliases to search, and thus no more maxclause issues.
Eg: instead of pAlias1, pAlias2, and pAlias3, I would give all of those pAlias (if they were generally related in some way). I would then call pAlias instead of the specific aforementioned ones.
Hope this helps.
add this code
is working on a reply...