Project

General

Profile

« Previous | Next » 

Revision 7664

Added by Jing Tao about 11 years ago

Add code to handle query for the http solr server.

View differences:

MetacatSolrEngineDescriptionHandler.java
60 60
public class MetacatSolrEngineDescriptionHandler {
61 61
    private static final String UNKNOWN = "Unknown";
62 62
    private static final String DESCRIPTIONFILENAME= "solrQueryFieldDescriptions.properties";
63
    private static final String HTTPSOLRSERVERSCHEMAURLPATH="/admin/file/?contentType=text/xml;charset=utf-8&file=schema.xml";
63 64
    
64 65
    private static MetacatSolrEngineDescriptionHandler handler = null;
65 66
    private static Log logger = LogFactory.getLog(MetacatSolrEngineDescriptionHandler.class);
......
90 91
    private MetacatSolrEngineDescriptionHandler() throws Exception {
91 92
       CoreContainer container = SolrServerFactory.getCoreContainer();
92 93
       if(container == null) {
93
           throw new Exception("MetacatSolrEngineDescriptionHandler - The Solr Server is not configured as an EmbeddedSolrServer since Metacat can't find the CoreContainer");
94
           throw new Exception("MetacatSolrEngineDescriptionHandler - The Solr Server is not configured as an EmbeddedSolrServer and the EmbeddedSolrServer is the only SolrServer that the Metacat can provide the Query Engine Description.");
94 95
       }
95 96
       String coreName = SolrServerFactory.getCollectionName();
96 97
       if(container == null) {

Also available in: Unified diff