Exemplo n.º 1
0
        public SearchIndexRequest(SearchIndexIdentity indexIdentity)
        {
            Ensure.That(indexIdentity, "indexIdentity").IsNotNull();

            IndexIdentity = indexIdentity;
            Sort = new List<string>();
        }
Exemplo n.º 2
0
        public SearchIndexRequest(SearchIndexIdentity indexIdentity)
        {
            Ensure.That(indexIdentity, "indexIdentity").IsNotNull();

            IndexIdentity = indexIdentity;
            Sort          = new List <string>();
        }
Exemplo n.º 3
0
        public SearchParameters(SearchIndexIdentity searchIndexIdentity)
        {
            Ensure.That(searchIndexIdentity, "searchIndexIdentity").IsNotNull();

            IndexIdentity = searchIndexIdentity;
            Sort          = new List <string>();
            Counts        = new List <string>();
            GroupSort     = new List <string>();
        }
Exemplo n.º 4
0
        public SearchParameters(SearchIndexIdentity searchIndexIdentity)
        {
            Ensure.That(searchIndexIdentity, "searchIndexIdentity").IsNotNull();

            IndexIdentity = searchIndexIdentity;
            Sort = new List<string>();
            Counts = new List<string>();
            GroupSort = new List<string>();
        }
Exemplo n.º 5
0
        public async Task <ActionResult> Index(string q)
        {
            var uri = new MyCouchUriBuilder("https://anupamjaiswal.cloudant.com/")
                      .SetBasicCredentials("anupamjaiswal", "social24x7")
                      .SetDbName("campaignlink")
                      .Build();

            //.SetBasicCredentials("cedsteressivarshwaskyage", "vbmqH8q0PwdKSqaN74yMlqsU")
            // var uri = new MyCouchUriBuilder("https://anupamjaiswal.cloudant.com/")
            //.SetDbName("animaldb")
            //.SetBasicCredentials("nortintastilineafterremp", "XUxnpETtOGgdJ4lnNDQcoG1Q")
            //.Build();

            using (var client = new MyCouchCloudantClient(uri))
            {
                var s = new SearchIndexIdentity("views", "SearchCampaign");


                var si = new MyCouch.Cloudant.Requests.SearchIndexRequest(s);
                si.Expression = q;
                si.Limit      = 25;

                si.Counts.Add("default");
                //si.IncludeDocs = true;



                dynamic x = await client.Searches.SearchAsync(si);

                List <string> idList = new List <string>();

                foreach (var data in x.Rows)
                {
                    foreach (var data1 in data.Fields)
                    {
                        idList.Add(data1.Value);
                    }
                }
                var uniqueid = idList.Distinct().ToList();

                ViewBag.Title    = q;
                ViewBag.uniqueid = uniqueid;
            }
            return(View());
        }
Exemplo n.º 6
0
        public SearchIndexRequest(SearchIndexIdentity indexIdentity)
        {
            Ensure.That(indexIdentity, "indexIdentity").IsNotNull();

            State = new SearchParameters(indexIdentity);
        }
Exemplo n.º 7
0
        public SearchIndexRequest(SearchIndexIdentity indexIdentity)
        {
            Ensure.That(indexIdentity, "indexIdentity").IsNotNull();

            State = new SearchParameters(indexIdentity);
        }