Project

General

Profile

« Previous | Next » 

Revision 7781

Added by Jing Tao over 11 years ago

Solr will be enabled if it is in the db.enabledEngines.

View differences:

src/edu/ucsb/nceas/metacat/dataone/MNodeService.java
1436 1436
	        }
1437 1437
	        return qed;
1438 1438
	    } else if (engine != null && engine.equals(EnabledQueryEngines.SOLRENGINE)) {
1439
	        /*if(!EnabledQueryEngines.getInstance().isEnabled(EnabledQueryEngines.SOLRENGINE)) {
1439
	        if(!EnabledQueryEngines.getInstance().isEnabled(EnabledQueryEngines.SOLRENGINE)) {
1440 1440
                throw new NotImplemented("0000", "MNodeService.getQueryEngineDescription - the query engine "+engine +" hasn't been implemented or has been disabled.");
1441
            }*/
1441
            }
1442 1442
	        try {
1443 1443
	            QueryEngineDescription qed = MetacatSolrEngineDescriptionHandler.getInstance().getQueryEngineDescritpion();
1444 1444
	            return qed;
......
1456 1456
	public QueryEngineList listQueryEngines() throws InvalidToken,
1457 1457
			ServiceFailure, NotAuthorized, NotImplemented {
1458 1458
		QueryEngineList qel = new QueryEngineList();
1459
		qel.addQueryEngine(EnabledQueryEngines.PATHQUERYENGINE);
1460
		qel.addQueryEngine(EnabledQueryEngines.SOLRENGINE);
1461
		/*List<String> enables = EnabledQueryEngines.getInstance().getEnabled();
1459
		//qel.addQueryEngine(EnabledQueryEngines.PATHQUERYENGINE);
1460
		//qel.addQueryEngine(EnabledQueryEngines.SOLRENGINE);
1461
		List<String> enables = EnabledQueryEngines.getInstance().getEnabled();
1462 1462
		for(String name : enables) {
1463 1463
		    qel.addQueryEngine(name);
1464
		}*/
1464
		}
1465 1465
		return qel;
1466 1466
	}
1467 1467

  
......
1505 1505
			}
1506 1506
			
1507 1507
		} else if (engine != null && engine.equals(EnabledQueryEngines.SOLRENGINE)) {
1508
		    /*if(!EnabledQueryEngines.getInstance().isEnabled(EnabledQueryEngines.SOLRENGINE)) {
1508
		    if(!EnabledQueryEngines.getInstance().isEnabled(EnabledQueryEngines.SOLRENGINE)) {
1509 1509
		        throw new NotImplemented("0000", "MNodeService.query - the query engine "+engine +" hasn't been implemented or has been disabled.");
1510
		    }*/
1510
		    }
1511 1511
		    logMetacat.info("The query is ==================================== \n"+query);
1512 1512
		    try {
1513 1513
		        
src/edu/ucsb/nceas/metacat/properties/ConfigurableProperties.java
132 132
			
133 133
			// include main metacat properties in d1 properties as overrides
134 134
			try {
135
			    Settings.getConfiguration();
135 136
				Settings.augmentConfiguration(mainConfigFilePath);
136 137
			} catch (ConfigurationException e) {
137 138
				logMetacat.error("Could not augment DataONE properties. " + e.getMessage(), e);

Also available in: Unified diff