public BatchedQueueingProcessor(ISearchFactoryImplementor searchFactoryImplementor, IDictionary properties)
        {
            this.searchFactoryImplementor = searchFactoryImplementor;
            //default to sync if none defined
            this.sync = !"async".Equals((string)properties[Environment.WorkerExecution], StringComparison.InvariantCultureIgnoreCase);

            string backend = (string)properties[Environment.WorkerBackend];

            batchSize = 0;//(int) properties[Environment.WorkerBatchSize];
            if (StringHelper.IsEmpty(backend) || "lucene".Equals(backend, StringComparison.InvariantCultureIgnoreCase))
            {
                backendQueueProcessorFactory = new LuceneBackendQueueProcessorFactory();
            }
            else
            {
                try
                {
                    System.Type processorFactoryClass = ReflectHelper.ClassForName(backend);
                    backendQueueProcessorFactory = (IBackendQueueProcessorFactory)Activator.CreateInstance(processorFactoryClass);
                }
                catch (Exception e)
                {
                    throw new SearchException("Unable to find/create processor class: " + backend, e);
                }
            }
            backendQueueProcessorFactory.Initialize(properties, searchFactoryImplementor);
            searchFactoryImplementor.BackendQueueProcessorFactory = backendQueueProcessorFactory;
        }
        public BatchedQueueingProcessor(ISearchFactoryImplementor searchFactoryImplementor, IDictionary properties)
        {
            this.searchFactoryImplementor = searchFactoryImplementor;
            //default to sync if none defined
            this.sync = !"async".Equals((string) properties[Environment.WorkerExecution],StringComparison.InvariantCultureIgnoreCase);

            string backend = (string) properties[Environment.WorkerBackend];
            batchSize = 0;//(int) properties[Environment.WorkerBatchSize];
            if (StringHelper.IsEmpty(backend) || "lucene".Equals(backend, StringComparison.InvariantCultureIgnoreCase))
            {
                backendQueueProcessorFactory = new LuceneBackendQueueProcessorFactory();
            }
            else
            {
                try
                {
                    System.Type processorFactoryClass = ReflectHelper.ClassForName(backend);
                    backendQueueProcessorFactory = (IBackendQueueProcessorFactory) Activator.CreateInstance(processorFactoryClass);
                }
                catch (Exception e)
                {
                    throw new SearchException("Unable to find/create processor class: " + backend, e);
                }
            }
            backendQueueProcessorFactory.Initialize(properties, searchFactoryImplementor);
            searchFactoryImplementor.BackendQueueProcessorFactory = backendQueueProcessorFactory;
        }