Search in sources :

Example 1 with ConfigurationFileProxy

use of org.codice.solr.factory.impl.ConfigurationFileProxy in project ddf by codice.

the class FilteringSolrIndex method createInMemorySolrProvider.

private static SolrCatalogProvider createInMemorySolrProvider(String queryId, FilterAdapter filterAdapter, QueryRequest request) {
    ConfigurationStore.getInstance().setInMemory(true);
    ConfigurationStore.getInstance().setForceAutoCommit(true);
    ConfigurationFileProxy configurationFileProxy = new ConfigurationFileProxy(ConfigurationStore.getInstance());
    SolrFilterDelegateFactory solrFilterDelegateFactory = new SolrFilterDelegateFactoryImpl();
    return new SolrCatalogProvider(createSolrServer(queryId, configurationFileProxy), filterAdapter, solrFilterDelegateFactory, new FilteringDynamicSchemaResolver(filterAdapter, solrFilterDelegateFactory, request));
}
Also used : SolrCatalogProvider(ddf.catalog.source.solr.SolrCatalogProvider) SolrFilterDelegateFactoryImpl(ddf.catalog.source.solr.SolrFilterDelegateFactoryImpl) SolrFilterDelegateFactory(ddf.catalog.source.solr.SolrFilterDelegateFactory) ConfigurationFileProxy(org.codice.solr.factory.impl.ConfigurationFileProxy)

Example 2 with ConfigurationFileProxy

use of org.codice.solr.factory.impl.ConfigurationFileProxy in project ddf by codice.

the class SolrProviderTestCase method setup.

@BeforeClass
public static void setup() throws Exception {
    cipherSuites = System.getProperty("https.cipherSuites");
    protocols = System.getProperty("https.protocols");
    System.setProperty("https.cipherSuites", "TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_DSS_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA");
    System.setProperty("https.protocols", "TLSv1.1, TLSv1.2");
    threadPoolSize = System.getProperty("org.codice.ddf.system.threadPoolSize");
    System.setProperty("org.codice.ddf.system.threadPoolSize", "128");
    System.setProperty("ddf.home", Paths.get("target/surefire/solr").toString());
    LOGGER.info("RUNNING one-time setup.");
    ConfigurationStore.getInstance().setInMemory(true);
    ConfigurationStore.getInstance().setForceAutoCommit(true);
    ConfigurationFileProxy configurationFileProxy = new ConfigurationFileProxy(ConfigurationStore.getInstance());
    provider = new SolrCatalogProvider(EmbeddedSolrFactory.getEmbeddedSolrServer("catalog", "solrconfig-inmemory.xml", "schema.xml", configurationFileProxy), new GeotoolsFilterAdapterImpl(), new SolrFilterDelegateFactoryImpl());
    // Mask the id, this is something that the CatalogFramework would
    // usually do
    provider.setId(MASKED_ID);
}
Also used : GeotoolsFilterAdapterImpl(ddf.catalog.filter.proxy.adapter.GeotoolsFilterAdapterImpl) ConfigurationFileProxy(org.codice.solr.factory.impl.ConfigurationFileProxy) BeforeClass(org.junit.BeforeClass)

Aggregations

ConfigurationFileProxy (org.codice.solr.factory.impl.ConfigurationFileProxy)2 GeotoolsFilterAdapterImpl (ddf.catalog.filter.proxy.adapter.GeotoolsFilterAdapterImpl)1 SolrCatalogProvider (ddf.catalog.source.solr.SolrCatalogProvider)1 SolrFilterDelegateFactory (ddf.catalog.source.solr.SolrFilterDelegateFactory)1 SolrFilterDelegateFactoryImpl (ddf.catalog.source.solr.SolrFilterDelegateFactoryImpl)1 BeforeClass (org.junit.BeforeClass)1