<commit_before><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jpa="http://www.springframework.org/schema/data/jpa"
	xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
	xmlns:mongo="http://www.springframework.org/schema/data/mongo"
	xmlns:util="http://www.springframework.org/schema/util" xmlns:task="http://www.springframework.org/schema/task"
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
        http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa.xsd
        http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
        http://www.springframework.org/schema/data/mongo http://www.springframework.org/schema/data/mongo/spring-mongo-1.0.xsd
        http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd
        http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.1.xsd">

	<import resource="classpath:/spring/validation.xml" />
	<context:component-scan base-package="org.slc.sli.dal" />
	<context:component-scan base-package="org.slc.sli.validation" />
	<context:component-scan base-package="org.slc.sli.common.util.uuid" />
	<context:annotation-config />
	<tx:annotation-driven />

	<context:property-placeholder location="file:${sli.conf}" system-properties-mode="OVERRIDE" />

	<bean id="entityEncryption" class="org.slc.sli.dal.encrypt.EntityEncryption" />
	<bean id="dalEntityCipher" class="org.slc.sli.dal.encrypt.AesCipher"></bean>
	<mongo:mapping-converter id="mappingConverter"
		base-package="org.slc.sli" db-factory-ref="mongoDbFactory">
		<mongo:custom-converters>
			<mongo:converter>
				<bean class="org.slc.sli.dal.convert.EntityReadConverter" />
			</mongo:converter>
		</mongo:custom-converters>
	</mongo:mapping-converter>
	<mongo:mongo id="searchMongo" host="${sli.mongodb.host}" port="${sli.mongodb.port}" />
	<bean id="mongoDbFactory" class="org.slc.sli.dal.repository.connection.TenantAwareMongoDbFactory">
		<constructor-arg ref="searchMongo" />
		<constructor-arg value="${sli.mongodb.database}" />
	</bean>
    <bean id="simpleEntityRepository" name="simpleValidationRepo" class="org.slc.sli.dal.repository.SimpleEntityRepository"/>

	<bean id="mongoTemplate" class="org.springframework.data.mongodb.core.MongoTemplate">
		<constructor-arg ref="mongoDbFactory" />
		<constructor-arg ref="mappingConverter" />
	</bean>
	<bean id="entityKeyEncoder" class="org.slc.sli.dal.repository.EntityKeyEncoder" />
	<bean id="mongoEntityRepository" name="validationRepo"
		class="org.slc.sli.dal.repository.MongoEntityRepository">
		<property name="template" ref="mongoTemplate" />
	</bean>

	<bean id="indexEntityConverter" class="org.slc.sli.search.transform.IndexEntityConverter">
		<property name="entityEncryption" ref="entityEncryption" />
		<property name="indexConfigStore" ref="indexConfigStore" />
	</bean>

	<bean id="indexConfigStore" class="org.slc.sli.search.config.IndexConfigStore">
		<constructor-arg name="configFile"
			value="${sli.search.index.config:index-config.json}" />
	</bean>
	
	<bean id="sourceDatasourceConnector" class="org.slc.sli.search.connector.impl.SourceDatastoreConnectorImpl">
		<property name="mongoTemplate" ref="mongoTemplate" />
	</bean>
	
	<bean id="searchEngineConnector" class="org.slc.sli.search.connector.impl.ESOperation">
		<property name="searchUrl" value="${sli.search.url}" />
		<property name="searchUsername" value="${sli.search.username}" />
		<property name="searchPassword" value="<PASSWORD>}" />
		<property name="searchTemplate" ref="searchTemplate" />
	</bean>
	
	<bean id="extractor" class="org.slc.sli.search.process.impl.ExtractorImpl"
		init-method="init" destroy-method="destroy">
		<property name="sourceDatastoreConnector" ref="sourceDatasourceConnector" />
		<property name="indexConfigStore" ref="indexConfigStore" />
		<property name="loader" ref="loader" />
		<property name="extractDir" value="${sli.search.indexer.dir.extract}" />
		<property name="runOnStartup" value="${sli.search.indexer.extract.runOnStartup}" />
	</bean>

	<bean id="incrementalListener" class="org.slc.sli.search.process.impl.IncrementalListenerImpl"
		init-method="init" destroy-method="destroy">
		<property name="indexer" ref="indexer" />
		<property name="indexEntityConverter" ref="indexEntityConverter" />
		<property name="activeMQConsumer" ref="jMSQueueConsumer" />
	</bean>

	<bean id="jMSQueueConsumer" class="org.slc.sli.search.util.amq.JMSQueueConsumer"
		init-method="init" destroy-method="destroy">
		<property name="mqURL" value="${sli.search.indexer.queue.url}" />
		<property name="mqUsername" value="${sli.search.indexer.queue.username}" />
		<property name="mqPswd" value="${sli.search.indexer.queue.password}" />
		<property name="queue" value="${sli.search.indexer.queue.name}" />
		<property name="embeddedBroker" value="${sli.search.indexer.broker.embedded:false}" />
	</bean>

	<bean id="loader" class="org.slc.sli.search.process.impl.LoaderImpl"
		init-method="init" destroy-method="destroy" lazy-init="false">
		<property name="indexer" ref="indexer" />
		<property name="indexEntityConverter" ref="indexEntityConverter" />
		<property name="inboxDir" value="${sli.search.indexer.dir.inbox}" />
		<property name="executorThreads" value="${sli.search.indexer.thread.number:5}" />
	</bean>
	<bean id="searchTemplate" class="org.springframework.web.client.RestTemplate" >
	    <constructor-arg>
	    <bean class="org.springframework.http.client.SimpleClientHttpRequestFactory">
		    <property name="connectTimeout" value="${sli.search.indexer.connTimeout:1000}" />
		    <property name="readTimeout" value="${sli.search.indexer.readTimeout:1000}" />
	    </bean>
	    </constructor-arg>
	</bean>
	<bean id="indexer" class="org.slc.sli.search.process.impl.IndexerImpl"
		init-method="init" destroy-method="destroy"><commit_msg>higher default timeouts<commit_after><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jpa="http://www.springframework.org/schema/data/jpa"
	xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
	xmlns:mongo="http://www.springframework.org/schema/data/mongo"
	xmlns:util="http://www.springframework.org/schema/util" xmlns:task="http://www.springframework.org/schema/task"
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
        http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa.xsd
        http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
        http://www.springframework.org/schema/data/mongo http://www.springframework.org/schema/data/mongo/spring-mongo-1.0.xsd
        http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd
        http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.1.xsd">

	<import resource="classpath:/spring/validation.xml" />
	<context:component-scan base-package="org.slc.sli.dal" />
	<context:component-scan base-package="org.slc.sli.validation" />
	<context:component-scan base-package="org.slc.sli.common.util.uuid" />
	<context:annotation-config />
	<tx:annotation-driven />

	<context:property-placeholder location="file:${sli.conf}" system-properties-mode="OVERRIDE" />

	<bean id="entityEncryption" class="org.slc.sli.dal.encrypt.EntityEncryption" />
	<bean id="dalEntityCipher" class="org.slc.sli.dal.encrypt.AesCipher"></bean>
	<mongo:mapping-converter id="mappingConverter"
		base-package="org.slc.sli" db-factory-ref="mongoDbFactory">
		<mongo:custom-converters>
			<mongo:converter>
				<bean class="org.slc.sli.dal.convert.EntityReadConverter" />
			</mongo:converter>
		</mongo:custom-converters>
	</mongo:mapping-converter>
	<mongo:mongo id="searchMongo" host="${sli.mongodb.host}" port="${sli.mongodb.port}" />
	<bean id="mongoDbFactory" class="org.slc.sli.dal.repository.connection.TenantAwareMongoDbFactory">
		<constructor-arg ref="searchMongo" />
		<constructor-arg value="${sli.mongodb.database}" />
	</bean>
    <bean id="simpleEntityRepository" name="simpleValidationRepo" class="org.slc.sli.dal.repository.SimpleEntityRepository"/>

	<bean id="mongoTemplate" class="org.springframework.data.mongodb.core.MongoTemplate">
		<constructor-arg ref="mongoDbFactory" />
		<constructor-arg ref="mappingConverter" />
	</bean>
	<bean id="entityKeyEncoder" class="org.slc.sli.dal.repository.EntityKeyEncoder" />
	<bean id="mongoEntityRepository" name="validationRepo"
		class="org.slc.sli.dal.repository.MongoEntityRepository">
		<property name="template" ref="mongoTemplate" />
	</bean>

	<bean id="indexEntityConverter" class="org.slc.sli.search.transform.IndexEntityConverter">
		<property name="entityEncryption" ref="entityEncryption" />
		<property name="indexConfigStore" ref="indexConfigStore" />
	</bean>

	<bean id="indexConfigStore" class="org.slc.sli.search.config.IndexConfigStore">
		<constructor-arg name="configFile"
			value="${sli.search.index.config:index-config.json}" />
	</bean>
	
	<bean id="sourceDatasourceConnector" class="org.slc.sli.search.connector.impl.SourceDatastoreConnectorImpl">
		<property name="mongoTemplate" ref="mongoTemplate" />
	</bean>
	
	<bean id="searchEngineConnector" class="org.slc.sli.search.connector.impl.ESOperation">
		<property name="searchUrl" value="${sli.search.url}" />
		<property name="searchUsername" value="${sli.search.username}" />
		<property name="searchPassword" value="${<PASSWORD>}" />
		<property name="searchTemplate" ref="searchTemplate" />
	</bean>
	
	<bean id="extractor" class="org.slc.sli.search.process.impl.ExtractorImpl"
		init-method="init" destroy-method="destroy">
		<property name="sourceDatastoreConnector" ref="sourceDatasourceConnector" />
		<property name="indexConfigStore" ref="indexConfigStore" />
		<property name="loader" ref="loader" />
		<property name="extractDir" value="${sli.search.indexer.dir.extract}" />
		<property name="runOnStartup" value="${sli.search.indexer.extract.runOnStartup}" />
	</bean>

	<bean id="incrementalListener" class="org.slc.sli.search.process.impl.IncrementalListenerImpl"
		init-method="init" destroy-method="destroy">
		<property name="indexer" ref="indexer" />
		<property name="indexEntityConverter" ref="indexEntityConverter" />
		<property name="activeMQConsumer" ref="jMSQueueConsumer" />
	</bean>

	<bean id="jMSQueueConsumer" class="org.slc.sli.search.util.amq.JMSQueueConsumer"
		init-method="init" destroy-method="destroy">
		<property name="mqURL" value="${sli.search.indexer.queue.url}" />
		<property name="mqUsername" value="${sli.search.indexer.queue.username}" />
		<property name="mqPswd" value="${sli.search.indexer.queue.password}" />
		<property name="queue" value="${sli.search.indexer.queue.name}" />
		<property name="embeddedBroker" value="${sli.search.indexer.broker.embedded:false}" />
	</bean>

	<bean id="loader" class="org.slc.sli.search.process.impl.LoaderImpl"
		init-method="init" destroy-method="destroy" lazy-init="false">
		<property name="indexer" ref="indexer" />
		<property name="indexEntityConverter" ref="indexEntityConverter" />
		<property name="inboxDir" value="${sli.search.indexer.dir.inbox}" />
		<property name="executorThreads" value="${sli.search.indexer.thread.number:5}" />
	</bean>
	<bean id="searchTemplate" class="org.springframework.web.client.RestTemplate" >
	    <constructor-arg>
	    <bean class="org.springframework.http.client.SimpleClientHttpRequestFactory">
		    <property name="connectTimeout" value="${sli.search.indexer.connTimeout:5000}" />
		    <property name="readTimeout" value="${sli.search.indexer.readTimeout:10000}" />
	    </bean>
	    </constructor-arg>
	</bean>
	<bean id="indexer" class="org.slc.sli.search.process.impl.IndexerImpl"
		init-method="init" destroy-method="destroy">
{'fraction_non_alphanumeric': 0.17752326413743735, 'fraction_numerical': 0.003738169092499801, 'mean_word_length': 5.6493918561607614, 'pattern_counts': {'":': 0, '<': 171, '<?xml version=': 2, '>': 171, 'https://': 0, 'lorem ipsum': 0, 'www.': 44, 'xml': 20}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1374317', 'n_tokens_mistral': 4284, 'n_tokens_neox': 4090, 'n_words': 455}