Search in sources :

Example 6 with IndexDao

use of org.apache.metron.indexing.dao.IndexDao in project metron by apache.

the class SolrSearchIntegrationTest method createDao.

protected static IndexDao createDao() {
    AccessConfig config = new AccessConfig();
    config.setMaxSearchResults(100);
    config.setMaxSearchGroups(100);
    config.setGlobalConfigSupplier(() -> new HashMap<String, Object>() {

        {
            put(SOLR_ZOOKEEPER, solrComponent.getZookeeperUrl());
        }
    });
    config.setIndexSupplier(sensorType -> sensorType);
    IndexDao dao = new SolrDao();
    dao.init(config);
    return dao;
}
Also used : SolrDao(org.apache.metron.solr.dao.SolrDao) AccessConfig(org.apache.metron.indexing.dao.AccessConfig) IndexDao(org.apache.metron.indexing.dao.IndexDao)

Aggregations

IndexDao (org.apache.metron.indexing.dao.IndexDao)6 AccessConfig (org.apache.metron.indexing.dao.AccessConfig)4 MultiIndexDao (org.apache.metron.indexing.dao.MultiIndexDao)3 HashMap (java.util.HashMap)2 Map (java.util.Map)2 MetaAlertConfig (org.apache.metron.indexing.dao.metaalert.MetaAlertConfig)2 ElasticsearchDao (org.apache.metron.elasticsearch.dao.ElasticsearchDao)1 HTableProvider (org.apache.metron.hbase.HTableProvider)1 MetaAlertDao (org.apache.metron.indexing.dao.metaalert.MetaAlertDao)1 CommentAddRemoveRequest (org.apache.metron.indexing.dao.update.CommentAddRemoveRequest)1 Document (org.apache.metron.indexing.dao.update.Document)1 RestException (org.apache.metron.rest.RestException)1 SolrDao (org.apache.metron.solr.dao.SolrDao)1 SolrClient (org.apache.solr.client.solrj.SolrClient)1 JSONObject (org.json.simple.JSONObject)1 Test (org.junit.jupiter.api.Test)1 Bean (org.springframework.context.annotation.Bean)1