I'm having problem with querying IEnumerable computed index field. Im using Sitecore 7.2 upd2, Lucene, ContentSearch and PredicateBuilder.
I'm trying to query product prices which are available under products section. There is some heavy Logic to find available products so I decided to put all available product prices in computed field. Unfortuantelly it looks like I'm unable to query prices list with PredicateBuilder.
My query looks like this:
predicate = predicate.And(p => p.Prices.Any(x => x >= priceFrom && x <= priceTo));
field configuration in index config:
<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" />
and that's my error:
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.
Any Ideas?