简体   繁体   中英

Integrating JSP with Apache SOLR

Can someone help me with integrating JSP with Apache SOLR? I am new to Apache SOLR and havn't used JSP much in recent years but know the working of it. I have developed the UI in JSP and want to accept the user query from JSP and query them in Apache SOLR. Thanks in advance.

A couple of things:

  1. You don't want to host your JSP in the same Jetty that Solr uses. Primarily because you don't want to expose your Solr server to the public internet (it is not secured). So, your JSP should be running on a separate server (Tomcat/Jetty/etc) and talk to Solr
  2. To talk to Solr you probably will want to use SolrJ client, which you need to keep around in a global pool of some sort
  3. Or, you could host your JSP views inside Spring container, in which case you could look at Spring Data Solr integration, which will manage the session for you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM