I have configured the search scope for SXA (Sitecore 9.3)
and it works as expected. However, when I try to add boost configuration to the search scope it throws the below error.
Invalid Method Call Argument Type: Field - FieldNode - Field: _name - System.String. Only constant arguments are supported.
It happens with any field added in the boost configuration.
The search query works again if I remove all the rules. The error in the log file is below:
26380 20:12:20 WARN Results endpoint exception
Exception: System.NotSupportedException
Message: Invalid Method Call Argument Type: Field - FieldNode - Field: _name - System.String. Only constant arguments is supported.
Source: Sitecore.ContentSearch.Linq
at Sitecore.ContentSearch.Linq.Parsing.ExpressionParser.ValidateMethodCallArguments(IEnumerable`1 arguments)
at Sitecore.ContentSearch.Linq.Parsing.ExpressionParser.EvaluateMethodCall(MethodCallExpression methodCall)
at Sitecore.ContentSearch.Linq.Parsing.ExpressionParser.VisitUnary(UnaryExpression expression)
at Sitecore.ContentSearch.Linq.Parsing.ExpressionParser.VisitBinary(BinaryExpression expression)
at Sitecore.ContentSearch.Linq.Parsing.ExpressionParser.VisitWhereMethod(MethodCallExpression methodCall)
at Sitecore.ContentSearch.Linq.Parsing.ExpressionParser.VisitCountMethod(MethodCallExpression methodCall)
at Sitecore.ContentSearch.Linq.Parsing.ExpressionParser.Parse(Expression expression)
at Sitecore.ContentSearch.Linq.Parsing.GenericQueryable`2.GetQuery(Expression expression)
at Sitecore.ContentSearch.Linq.Parsing.GenericQueryable`2.Execute[TResult](Expression expression)
at Sitecore.XA.Feature.Search.Controllers.SearchController.GetResults(QueryModel model)
Any help is appreciated.