Package com.senseidb.search.node

Examples of com.senseidb.search.node.SenseiZoieSystemFactory


            logger.error("directory mode " + modeValue + " is not supported, SIMPLE is used.");
            dirMode = DIRECTORY_MODE.SIMPLE;
        }

        if (SENSEI_INDEXER_TYPE_ZOIE.equals(indexerType)) {
            SenseiZoieSystemFactory senseiZoieFactory = new SenseiZoieSystemFactory(idxDir, dirMode, interpreter, decorator, zoieConfig);

            int retentionDays = _senseiConf.getInt(SENSEI_ZOIE_RETENTION_DAYS, -1);
            if (retentionDays > 0) {
                RetentionFilterFactory retentionFilterFactory = pluginRegistry.getBeanByFullPrefix(SENSEI_ZOIE_RETENTION_CLASS, RetentionFilterFactory.class);
                Filter purgeFilter = null;
                if (retentionFilterFactory != null) {
                    purgeFilter = retentionFilterFactory.buildRetentionFilter(retentionDays);
                } else {
                    String timeColumn = _senseiConf.getString(SENSEI_ZOIE_RETENTION_COLUMN, null);
                    if (timeColumn == null) {
                        throw new ConfigurationException("Retention specified without a time column");
                    }
                    String unitString = _senseiConf.getString(SENSEI_ZOIE_RETENTION_TIMEUNIT, "seconds");
                    TimeUnit unit = TimeUnit.valueOf(unitString.toUpperCase());
                    if (unit == null) {
                        throw new ConfigurationException("Invalid timeunit for retention: " + unitString);
                    }
                    purgeFilter = new TimeRetentionFilter(timeColumn, retentionDays, unit);
                }
                if (purgeFilter != null && pluggableSearchEngineManager != null) {
                    purgeFilter = new PurgeFilterWrapper(purgeFilter, pluggableSearchEngineManager);
                }
            }

            OptimizeScheduler scheduler = pluginRegistry.getBeanByFullPrefix(SENSEI_INDEX_OPTIMIZE_SCHEDULER, OptimizeScheduler.class);
            senseiZoieFactory.setOptimizeScheduler(scheduler);

            zoieSystemFactory = senseiZoieFactory;
        } else if (SENSEI_INDEXER_TYPE_HOURGLASS.equals(indexerType)) {
            String schedule = _senseiConf.getString(SENSEI_HOURGLASS_SCHEDULE, "");
            int trimThreshold = _senseiConf.getInt(SENSEI_HOURGLASS_TRIMTHRESHOLD, 14);
View Full Code Here

TOP

Related Classes of com.senseidb.search.node.SenseiZoieSystemFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.