using Solr with IIS [closed]

2019-04-10 05:07发布

问题:

We are going to use solr as our search server but as you know solr is based on java and apache server and our database is MSSQL and our webserver is IIS. Could you possible suggest me the best way to incorporate java apache asp.net and IIS?

Best

回答1:

You cannot deploy Solr inside IIS because it requires a servlet container. Instead you can deploy solr in any one of the below servelt containers

  • Glassfish
  • JBoss
  • Jetty (default, included into solr package)
  • Resin
  • Tomcat
  • Weblogic
  • WebSphere

You can find the in-depth details about each deployment here SolrInstall

Then you can communicate with solr from .net using either one of these drivers(clients)

  • solrnet
  • SolrSharp

You dont need to worry about IIS at all.



回答2:

https://bitnami.com/stack/solr

It's an installer. And Bitnami soooo rocks for doing this! Just tried a bunch of different things...

Using Web Platform Installer to install Zoo, which does Solr through IIS. It's bugged out.

Jetty doesn't install as a service

Tried running Tomcat 8 with their IIS connector (acts as a filter you can set an app to). Configuration was insane. Missing files from the connector.

Found that as my last search, and it's awesome!



回答3:

This is how you should set up your application.

  1. Host Solr in Tomcat.
  2. Use DataImportHandler to feed data from MSSQL to Solr.
  3. From your ASP application talk to the Solr via HTTP. (Write some helper classes for this)
  4. Parse the JSON response using Newtonsoft.Json.Linq library.
  5. The best practice is that you get the document IDs from Solr and fetch the other information from MSSQL.

I have configured this set up in a large e-commerce site and supported site search, search suggestions, search refinements (using facets), and lot of other complex lookups. It's working great and super fast.



回答4:

Take a look at this one. They deploy java servlets under iis. http://www.helicontech.com/articles/deploying-java-servlet-applications-on-windows-with-iis/