A demonstration of using Apache Solr as a search engine behind an ASP.NET MVC4 web application and glued together with SolrNet as a .NET Solr client library.
- Get the AdventureWorks sample database and deploy it locally.
- Clone this repo from github.
- Deploy the vSolrImport view to your AdventureWorks database.
- Install the Java runtime if you don't have it.
- Start Solr by executing the Solr/start_solr.cmd script in the solution.
- On http://localhost:8983/solr (the administration site for Solr) trigger a data-import by browsing to adventureWorksProductsCollection -> Dataimport. Click Clean/Commit/Optimize and then Execute. Note: The Solr data import is configured via Solr\solr-4.1.0\adventureWorksInstance\solr\adventureWorksProductsCollection\conf\data-config.xml You will likely need to tweak the connection string and credentials for your database server.
- Run the web application.
The following files exist in the Solr\solr-4.1.0\adventureWorksInstance\solr\adventureWorksProductsCollection\conf
- data-config.xml - Configuration for Solr data import handler
- elevate.xml - Configuration for Solr query elevation component
- schema.xml - The Solr document schema
- solrconfig.xml - Solr's main configuration, contains configuration of all request handlers
- synonyms.txt - Solr's word replacement configuration