IEnumerable 計算インデックス フィールドのクエリに問題があります。Sitecore 7.2 upd2、Lucene、ContentSearch、および PredicateBuilder を使用しています。
製品セクションで利用可能な製品価格を照会しようとしています。利用可能な製品を見つけるための重いロジックがいくつかあるので、利用可能なすべての製品価格を計算フィールドに入れることにしました。残念ながら、PredicateBuilder で価格リストを照会できないようです。
私のクエリは次のようになります。
predicate = predicate.And(p => p.Prices.Any(x => x >= priceFrom && x <= priceTo));
インデックス構成のフィールド構成:
<field fieldName="Prices" storageType="YES" indexType="TOKENIZED" vectorType="NO" boost="1f" type="System.Collections.Generic.IEnumerable`1[System.Int32]" settingType="Sitecore.ContentSearch.LuceneProvider.LuceneSearchFieldConfiguration, Sitecore.ContentSearch.LuceneProvider" />
それは私のエラーです:
Invalid Method Call Argument Type: Field - FieldNode - Field: prices - System.Collections.Generic.IEnumerable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]. Only constant arguments is supported.
何か案は?