Migrating SolrNet MVC2 Application to MVC3

2019-08-27 03:04发布

问题:

The sample application for SolrNET search is in MVC 2. I tried to convert it into MVC 3 application. The search is working perfectly, by connecting to my own solr instance. But the faceting is not getting displayed.

private static readonly string[] AllFacetFields = new[] { "Dataaccess", "AccessMethod", "Datacreator", "Dataset", "Geographicalarea"};

And when the I sort the search results according to the best match, price and random, I get the link like,

http://localhost:2086/?sort=price

But, what should I do, if I want to change the "price" to something else. I have been working on SolrNet only for the last few days and I'm stuck with the faceting.

回答1:

The question title says "Migrating SolrNet MVC2 Application to MVC3" but the real problem of the OP was about implementing multifaceting. The SolrNet sample app doesn't currently implement multifaceting, but SolrNet itself does. The OP wanted a sample app with multifaceting for free. See the comments for more information.