There are issues in my SOLR 8.1.1 instance which is setup as an Azure App.
The Query like following is failing:
((((((title_t:(“code of practice on local authority accounting in the united kingdom: guidance notes for 2023/24 accounts (online)”))^4.5 OR (title_t:(“*code of practice on local authority accounting in the united kingdom: guidance notes for 2023/24 accounts (online)*”))^4 OR _name:(“*code of practice on local authority accounting in the united kingdom: guidance notes for 2023/24 accounts (online)*”) OR _content:(“*code of practice on local authority accounting in the united kingdom: guidance notes for 2023/24 accounts (online)*”) OR renderpagecontent_t:(“*code of practice on local authority accounting in the united kingdom: guidance notes for 2023/24 accounts (online)*”) OR title_t:(code) OR _name:(code) OR _content:(code) OR renderpagecontent_t:(code) OR title_t:(practice) OR _name:(practice) OR _content:(practice) OR renderpagecontent_t:(practice) OR title_t:(local) OR _name:(local) OR _content:(local) OR renderpagecontent_t:(local) OR title_t:(authority) OR _name:(authority) OR _content:(authority) OR renderpagecontent_t:(authority) OR title_t:(accounting) OR _name:(accounting) OR _content:(accounting) OR renderpagecontent_t:(accounting) OR title_t:(united) OR _name:(united) OR _content:(united) OR renderpagecontent_t:(united) OR title_t:(kingdom) OR _name:(kingdom) OR _content:(kingdom) OR renderpagecontent_t:(kingdom) OR title_t:(guidance) OR _name:(guidance) OR _content:(guidance) OR renderpagecontent_t:(guidance) OR title_t:(notes) OR _name:(notes) OR _content:(notes) OR renderpagecontent_t:(notes) OR title_t:(“*2023 24*”) OR _name:(“*2023 24*”) OR _content:(“*2023 24*”) OR renderpagecontent_t:(“*2023 24*”) OR title_t:(accounts) OR _name:(accounts) OR _content:(accounts) OR renderpagecontent_t:(accounts) OR title_t:(online) OR _name:(online) OR _content:(online) OR renderpagecontent_t:(online)) AND (-hidefromglobalsearch_b:(True) :)) AND (-_name:(“__standard values”) :)) AND (-urllink_s:(/sitecore*) :)) AND (-isarchived_b:(True) :))
While a query like following works:
(((title_t:(“code of practice on local authority accounting in the united kingdom: guidance notes for 2023/24 accounts (online)”))^4.5 OR (title_t:(“*code of practice on local authority accounting in the united kingdom: guidance notes for 2023/24 accounts (online)*”))^4 OR _name:(“*code of practice on local authority accounting in the united kingdom: guidance notes for 2023/24 accounts (online)*”) OR _content:(“*code of practice on local authority accounting in the united kingdom: guidance notes for 2023/24 accounts (online)*”) OR renderpagecontent_t:(“*code of practice on local authority accounting in the united kingdom: guidance notes for 2023/24 accounts (online)*”) OR title_t:(code) OR _name:(code) OR _content:(code) OR renderpagecontent_t:(code) OR title_t:(practice) OR _name:(practice) OR _content:(practice) OR renderpagecontent_t:(practice) OR title_t:(local) OR _name:(local) OR _content:(local) OR renderpagecontent_t:(local) OR title_t:(authority) OR _name:(authority) OR _content:(authority) OR renderpagecontent_t:(authority) OR title_t:(accounting) OR _name:(accounting) OR _content:(accounting) OR renderpagecontent_t:(accounting) OR title_t:(united) OR _name:(united) OR _content:(united) OR renderpagecontent_t:(united) OR title_t:(kingdom) OR _name:(kingdom) OR _content:(kingdom) OR renderpagecontent_t:(kingdom) OR title_t:(guidance) OR _name:(guidance) OR _content:(guidance) OR renderpagecontent_t:(guidance) OR title_t:(notes) OR _name:(notes) OR _content:(notes) OR renderpagecontent_t:(notes) OR title_t:(“*2023 24*”) OR _name:(“*2023 24*”) OR _content:(“*2023 24*”) OR renderpagecontent_t:(“*2023 24*”) OR title_t:(accounts) OR _name:(accounts) OR _content:(accounts) OR renderpagecontent_t:(accounts) AND (-hidefromglobalsearch_b:(True) :)) )
The only difference is the number of OR Clauses are more in the 1st query that fails.
I’m using Sitecore 9.3, and in the code it uses a predicate to send the query to Solr, I’ve even tried restricting the number of OR clauses in the code but that doesn’t help either. The C# code is as below:
// Search the individual words
foreach (var t in searchText.Split(‘ ‘))
{
if (count < maxNumWordsAllowed)
{
if (!exclude.Any(x => t.ToLower() == x))
{
predicate = predicate.Or(x => x.Title.Contains(t)).Boost(0.9f);
predicate = predicate.Or(x => x.Name.Contains(t)).Boost(0.7f);
predicate = predicate.Or(x => x.Content.Contains(t)).Boost(0.5f);
predicate = predicate.Or(x => x.Renderpagecontent.Contains(t)).Boost(0.6f);
count++;
}
}
}
I’m really stuck, please could someone help!!
My understanding is default SOLR config is controlled by:
${solr.max.booleanClauses:1024}
I’ve tried changing this to various high values upto 30000, and it doesn’t make any difference?
Also, tried restricting the number of OR Clause in predicate, but that also didn’t help.