SXAブーストのルールが正しく適用されない


解説

SXA サイトの検索範囲にブースティング ルールを追加すると、ブースティング ルールが適用されず、次の例外がログに表示される場合があります:

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)

解決策

この問題を解決するには、以下のいずれかの方法を検討してください。