Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Asembli 85 posts 259 karma points
    Oct 27, 2023 @ 09:45
    Asembli
    0

    Exception Details: Lucene.Net.Search.BooleanQuery

    I would like to reopen an old thread that comes up several times on the forum, in case someone already has a solution.

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

    So, we have a website in V12 that isn't even that extensive. In V7, we have quite a few web pages that are much larger than this (we're talking about the number of different fields within documentType) and we have a similar built-in basic external index search and there are no such problems. There is a solution described online to increase maxClauseCount, but the Lucene.net namespace in V12 does not offer me the SetMaxClauseCount option.

    So if the default value is 1024 and I now have 1500 fields, how would I increase it by say 2x in my code, to have 2048 fields available.

    There is a proposal on the net @using Lucene.Net.Search; @BooleanQuery.SetMaxClauseCount(2048);

    but I can't reach the SetMaxClauseCount method...

    Regards

  • Asembli 85 posts 259 karma points
    Oct 27, 2023 @ 11:26
    Asembli
    0

    But this is really strange. This did not give me peace and I made a duplicate of the database. Then I pointed the application to the duplicate database and deleted half the content(!). I didn't change any fields. All of a sudden the error disappeared and ExternalIndex starts to work.

    Does this mean that the search is even limited by the amount of content?

    Regards

  • LandLogic IT 6 posts 27 karma points
    May 13, 2024 @ 18:52
    LandLogic IT
    0

    Solution for Umbraco 12+:

    @using Lucene.Net.Search

    @{

    BooleanQuery.MaxClauseCount = Int32.MaxValue;
    

    }

  • Asembli 85 posts 259 karma points
    Oct 27, 2023 @ 12:31
    Asembli
    0

    Found exactly what happened with me:

    https://github.com/umbraco/Umbraco-CMS/issues/14751

    Hope this will be fix soon.

    Regards

  • Asembli 85 posts 259 karma points
    Oct 27, 2023 @ 16:56
Please Sign in or register to post replies

Write your reply to:

Draft