/
service-ome.api.Search.xml
116 lines (100 loc) · 4.87 KB
/
service-ome.api.Search.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<!--
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# $Id$
#
# Copyright 2008 Glencoe Software, Inc. All rights reserved.
# Use is subject to license terms supplied in LICENSE.txt
#
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<!--
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Written by: Josh Moore, josh at glencoesoftware.com
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<beans>
<bean singleton="false" parent="stateful"
id="internal-ome.api.Search"
class="ome.services.SearchBean">
<property name="executor" ref="executor"/>
<property name="analyzer" value="${omero.search.analyzer}"/>
<property name="maxClauseCount" value="${omero.search.maxclause}"/>
</bean>
<bean id="managed-ome.api.Search" parent="selfManagingService" singleton="false">
<property name="proxyInterfaces" value="ome.api.Search"/>
<property name="target" ref="internal-ome.api.Search"/>
</bean>
<!-- Trigger for running lucene -->
<bean id="fullTextThread" class="ome.services.fulltext.FullTextThread"
init-method="start" destroy-method="stop">
<constructor-arg ref="sessionManager"/>
<constructor-arg ref="executor"/>
<constructor-arg ref="fullTextIndexer"/>
<constructor-arg ref="fullTextBridge"/>
</bean>
<bean id="fullTextIndexer" class="ome.services.fulltext.FullTextIndexer">
<constructor-arg ref="eventLogLoader"/>
<constructor-arg ref="metrics"/>
<property name="repetitions" value="${omero.search.repetitions}"/>
<property name="reportingLoops" value="${omero.search.reporting_loops}"/>
</bean>
<bean id="fullTextBridge" class="ome.services.fulltext.FullTextBridge">
<constructor-arg ref="fileParsers"/>
<constructor-arg ref="/OMERO/Files"/>
<constructor-arg value="${omero.search.bridges}"/>
</bean>
<!-- Use "*" as a wildcard parser -->
<bean id="fileParsers" class="java.util.HashMap">
<constructor-arg>
<map>
<entry key="text/plain" value-ref="fileParser"/>
<entry key="text/csv" value-ref="fileParser"/>
<entry key="text/xml" value-ref="fileParser"/>
<entry key="application/xml" value-ref="fileParser"/>
<entry key="application/pdf" value-ref="pdfParser"/>
</map>
</constructor-arg>
</bean>
<bean id="fileParser" class="ome.services.fulltext.FileParser">
<property name="maxFileSize" value="${omero.search.max_file_size}"/>
</bean>
<bean id="pdfParser" class="ome.services.fulltext.PdfParser">
<property name="maxFileSize" value="${omero.search.max_file_size}"/>
</bean>
<alias name="${omero.search.event_log_loader}" alias="eventLogLoader"/>
<bean id="persistentEventLogLoader" class="ome.services.fulltext.PersistentEventLogLoader">
<property name="queryService" ref="internal-ome.api.LocalQuery"/>
<property name="sqlAction" ref="simpleSqlAction"/>
<property name="key" value="PersistentEventLogLoader.v2.current_id"/>
<property name="types" ref="internal-ome.api.ITypes"/>
<property name="batchSize" value="${omero.search.batch}"/>
<property name="excludes" value="${omero.search.excludes}"/>
</bean>
<bean id="eventLogQueue" class="ome.services.eventlogs.EventLogQueue">
<constructor-arg index="0" ref="metrics"/>
<constructor-arg index="1" value="${omero.search.max_partition_size}"/>
<constructor-arg index="2" value="${omero.search.include_types}"/>
<constructor-arg index="3" value="${omero.search.include_actions}"/>
<property name="queryService" ref="internal-ome.api.LocalQuery"/>
<property name="sqlAction" ref="simpleSqlAction"/>
<property name="key" value="PersistentEventLogLoader.v2.current_id"/>
<property name="types" ref="internal-ome.api.ITypes"/>
<property name="batchSize" value="${omero.search.batch}"/>
<property name="excludes" value="${omero.search.excludes}"/>
</bean>
<bean id="fullTextThreadRun" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="fullTextThread" />
<property name="targetMethod" value="run" />
<!-- FullTextThread now handles locking properly itself, however when Quartz
runs multiple threads concurrently and one or more experiences a fatal
error (e.g. OOM) it seems that we can still get into a deadlock
situation. Since we can only perform actual indexing work on one thread
at a time anyway, we will disable concurrency until the deadlock issue
can be resolved. -->
<property name="concurrent" value="false" />
</bean>
<!-- FullText trigger moved to indexer.xml for running as separate process -->
</beans>