.neturlsolrsolrnet

When querying Solr using SolrNet, what is the easiest way to see the actual Url that gets requested?


I'm trying to debug a application that is using SolrNet to query Solr. I'm trying to figure out what url that actually gets requested from SolrNet so that I can debug it more easilly in a web browser.


Solution

  • Just to save you the effort of heading out to the forum :

    var serializer = ServiceLocator.Current.GetInstance<ISolrQuerySerializer>(); 
    queries = new List<ISolrQuery>
    {
    new SolrQueryByField("category_facet", "Fjärrin"),
    new SolrQueryByField("branch_facet", sigel),
    new SolrQueryByField("isArchived", "false"),
    SolrQuery.All
    };
    var q = new SolrMultipleCriteriaQuery(queries,"AND");
    var queryRaw = serializer.Serialize(q);
    Debug.WriteLine(queryRaw);