Example #1
0
        public IEnumerable<SolrDocument> Execute(DocumentQuery query)
        {
            using (var client = new WebClient())
            {
                var response = client.DownloadString("http://localhost:8983/solr/browse?" + query.ToSolrQuery());
                var responseElement = XElement.Parse(response);

                return responseElement.Element("result")
                    .Elements("doc")
                    .Select(x => new SolrDocument(x));
            }
        }