Exemplo n.º 1
0
        private void button5_Click(object sender, EventArgs e)
        {
            var search = new RiakSearchRequest
            {
                Query = new RiakFluentSearch("famous", "name_s")
                        .Search("Lion*")
                        .Build()
            };

            var rslt = client.Search(search);
            RiakSearchResult searchResult = rslt.Value;

            foreach (RiakSearchResultDocument doc in searchResult.Documents)
            {
                var args = new[] {
                    doc.BucketType,
                    doc.Bucket,
                    doc.Key,
                    string.Join(", ", doc.Fields.Select(f => f.Value).ToArray())
                };
                Console.WriteLine(
                    format: "BucketType: {0} Bucket: {1} Key: {2} Values: {3}",
                    args);
            }


            var search1 = new RiakSearchRequest("famous", "age_i:[36 TO *]");
            var rslt1   = client.Search(search1);
        }
        public static Func <RiakResult <RiakSearchResult> > RunSolrQuery(this IRiakClient client, RiakSearchRequest req)
        {
            Func <RiakResult <RiakSearchResult> > runSolrQuery =
                () => client.Search(req);

            return(runSolrQuery);
        }
Exemplo n.º 3
0
 public Task <RiakResult <RiakSearchResult> > Search(RiakSearchRequest search)
 {
     return(Task.Factory.StartNew(() => _client.Search(search)));
 }