using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using SolrNet; using SolrNet.Commands; using SolrNet.Attributes; using Microsoft.Practices.ServiceLocation; using HttpWebAdapters; public partial class _Default : System.Web.UI.Page { public class SolrSearchResult { [SolrField("id")] public string id { get; set; } [SolrField("title")] public string title { get; set; } } void Application_Start(object sender, EventArgs e) { Startup.Init("http://localhost:8080/solr"); } protected void Page_Load(object sender, EventArgs e) { ISolrOperations solr = ServiceLocator.Current.GetInstance>(); SolrQueryResults results = solr.Query(new SolrQuery("http://localhost:8080/solr/mycore/select?q=test&indent=on&wt=xml&rows=10&start=0")); foreach (SolrSearchResult result in results) { Response.Write(result.title); } } }