Hi ,
I am trying to get data from couchbase Server using .Net linq with where predicate , but where conditions not affect on query. MyBucket have a 15797 documents and query return 00:15.294 second.
public IEnumerable<HInfo> FindDodo(Func<HCView, bool> predicate)
{
var result = Enumerable.Empty<HInfo>();
if (predicate == null)
return result;
return BucketContext.Query<HCView>().Where(predicate).Select(p => p.Item);
}
then call this method ;
var cacheResult = FindDodo(h => saleType.Contains(h.Item.HType) &&
Utils.PrerpareSearch(h.Item.Name).equals( searchText)).ToList();
And Utils.PrerpareSearch not working .
Is this a correct way , What I’m missing ?