Project

General

Profile

« Previous | Next » 

Revision 10065

add indexing for scores based on successful checks by check.type

View differences:

metacat-index/src/main/resources/application-context-mdq.xml
20 20
				<ref bean="mdq.metadata.datasource" />
21 21
				<ref bean="mdq.metadata.funder" />
22 22
				<ref bean="mdq.metadata.rightsHolder" />				
23
				<ref bean="mdq.green" />
24
				<ref bean="mdq.orange" />
25
				<ref bean="mdq.red" />
26
				<ref bean="mdq.blue" />
27
				<ref bean="mdq.total" />
23
				<ref bean="mdq.score.green" />
24
				<ref bean="mdq.score.orange" />
25
				<ref bean="mdq.score.red" />
26
				<ref bean="mdq.score.blue" />
27
				<ref bean="mdq.score.total" />
28
				<ref bean="mdq.score.identification" />
29
				<ref bean="mdq.score.interpretation" />
30
				<ref bean="mdq.score.discovery" />
31
				<ref bean="mdq.score.other" />
28 32
			</list>
29 33
		</property>
30 34
	</bean>
......
79 83
		<property name="multivalue" value="false" />
80 84
	</bean>
81 85
	
82
	<bean id="mdq.green" class="org.dataone.cn.indexer.parser.SolrField">
86
	<!-- scoring by result status -->
87
	<bean id="mdq.score.green" class="org.dataone.cn.indexer.parser.SolrField">
83 88
		<constructor-arg name="name" value="mdq_green_i" />
84 89
		<constructor-arg name="xpath"
85
			value="count(//result/status[text() = 'SUCCESS'])" />
90
			value="count(//result[check/level[text() != 'SKIP']]/status[text() = 'SUCCESS'])" />
86 91
		<property name="multivalue" value="false" />
87 92
	</bean>
88
	<bean id="mdq.orange" class="org.dataone.cn.indexer.parser.SolrField">
93
	<bean id="mdq.score.orange" class="org.dataone.cn.indexer.parser.SolrField">
89 94
		<constructor-arg name="name" value="mdq_orange_i" />
90 95
		<constructor-arg name="xpath"
91 96
			value="count( //result/status[text() = 'ERROR'] | //result[check/level[text() = 'OPTIONAL']]/status[text() = 'FAILURE'])" />
92 97
		<property name="multivalue" value="false" />
93 98
	</bean>
94
	<bean id="mdq.red" class="org.dataone.cn.indexer.parser.SolrField">
99
	<bean id="mdq.score.red" class="org.dataone.cn.indexer.parser.SolrField">
95 100
		<constructor-arg name="name" value="mdq_red_i" />
96 101
		<constructor-arg name="xpath"
97 102
			value="count(//result[check/level[text() = 'REQUIRED']]/status[text() = 'FAILURE'])" />
98 103
		<property name="multivalue" value="false" />
99 104
	</bean>
100
	<bean id="mdq.blue" class="org.dataone.cn.indexer.parser.SolrField">
105
	<bean id="mdq.score.blue" class="org.dataone.cn.indexer.parser.SolrField">
101 106
		<constructor-arg name="name" value="mdq_blue_i" />
102 107
		<constructor-arg name="xpath"
103 108
			value="count(//result/status[text() = 'SKIP'])" />
104 109
		<property name="multivalue" value="false" />
105 110
	</bean>
106 111
	
107
	<bean id="mdq.total" class="org.dataone.cn.indexer.parser.SolrField">
112
	<!-- scoring by check.type -->
113
	<bean id="mdq.score.identification" class="org.dataone.cn.indexer.parser.SolrField">
114
		<constructor-arg name="name" value="mdq_identification_d" />
115
		<constructor-arg name="xpath"
116
			value="count(//result[check/type[text() = 'identification']]/status[text() = 'SUCCESS']) / count(//result[check/type[text() = 'identification']])" />
117
		<property name="multivalue" value="false" />
118
	</bean>
119
	<bean id="mdq.score.interpretation" class="org.dataone.cn.indexer.parser.SolrField">
120
		<constructor-arg name="name" value="mdq_interpretation_d" />
121
		<constructor-arg name="xpath"
122
			value="count(//result[check/type[text() = 'interpretation']]/status[text() = 'SUCCESS']) / count(//result[check/type[text() = 'interpretation']])" />
123
		<property name="multivalue" value="false" />
124
	</bean>
125
	<bean id="mdq.score.discovery" class="org.dataone.cn.indexer.parser.SolrField">
126
		<constructor-arg name="name" value="mdq_discovery_d" />
127
		<constructor-arg name="xpath"
128
			value="count(//result[check/type[text() = 'discovery']]/status[text() = 'SUCCESS']) / count(//result[check/type[text() = 'discovery']])" />
129
		<property name="multivalue" value="false" />
130
	</bean>
131
	<bean id="mdq.score.other" class="org.dataone.cn.indexer.parser.SolrField">
132
		<constructor-arg name="name" value="mdq_other_d" />
133
		<constructor-arg name="xpath"
134
			value="count(//result[check/type[text() != 'identification' and text() != 'interpretation' and text() != 'discovery']]/status[text() = 'SUCCESS']) / count(//result[check/type[text() != 'identification' and text() != 'interpretation' and text() != 'discovery']])" />
135
		<property name="multivalue" value="false" />
136
	</bean>
137
	
138
	<bean id="mdq.score.total" class="org.dataone.cn.indexer.parser.SolrField">
108 139
		<constructor-arg name="name" value="mdq_total_i" />
109 140
		<constructor-arg name="xpath"
110 141
			value="count(//result)" />

Also available in: Unified diff