hamid khaje
hamid khaje

Reputation: 233

how get result more than of 1024 in raven

i Have This Code:

var query = sf + ((!String.IsNullOrEmpty(model.filter) && model.filter != "none") ? "*" + model.filter + "*" : "*");
 var list = db.Advanced.DocumentQuery<Shop>();
list = list.AndAlso().Where(query);

my db is raven and I want to get all items of shop (items in shop are more than of 1024) for this i use this code:

           var o = 0;
            var g = new List<Shop>();
            do
            {
                var _list = list.Skip(o*1000).Take(1000);
                if(_list==null)
                  break;
                g.AddRange(_list);
                o++;
            }while(true)

problems:

  1. _list never don't equal to null
  2. for resolve this problem use this code if(_list.tolist().count()==0)break; but skip don't work!

Upvotes: 1

Views: 57

Answers (1)

Akbar Taghipour
Akbar Taghipour

Reputation: 334

Set Raven Hilo in database for Intended ِDocument. Path Documents>System Documents>Your Document

Upvotes: 1

Related Questions