Project

General

Profile

« Previous | Next » 

Revision 10225

Disable indexing of 'prov_hasSources' field

View differences:

metacat-index/src/main/resources/application-context-prov-base.xml
334 334
        </constructor-arg>
335 335
    </bean>
336 336

  
337
    <!--  Find the source pids used by a program -->
338
    <!--  This is the inverse relationship of prov_usedByProgram -->
337
    <!--  This index field is inteded for use across multiple documents, which requires
338
          a triple store, which is not currently implemented, so it is disabled for now..
339 339
    <bean id="prov20150115.hasSources" class="org.dataone.cn.indexer.annotation.SparqlField">
340 340
        <constructor-arg name="name" value="prov_hasSources" />
341 341
        <constructor-arg name="query">
......
363 363
            </value>
364 364
        </constructor-arg>
365 365
    </bean>
366
    -->
366 367
    
367 368
    <bean id="prov20150115.hasDerivations" class="org.dataone.cn.indexer.annotation.SparqlField">
368 369
        <constructor-arg name="name" value="prov_hasDerivations" />
metacat-index/src/main/resources/application-context-provone20150115.xml
25 25
                <ref bean="prov20150115.wasExecutedByExecution" />
26 26
                <ref bean="prov20150115.wasExecutedByUser" />
27 27
                <ref bean="prov20150115.instanceOfClass" />
28
                <ref bean="prov20150115.hasSources" />
28
                <!--  <ref bean="prov20150115.hasSources" /> -->
29 29
                <ref bean="prov20150115.hasDerivations" />
30 30
			</list>
31 31
		</property>
......
43 43
     			<value>prov_usedByUser</value>
44 44
     			<value>prov_wasExecutedByExecution</value>
45 45
     			<value>prov_wasExecutedByUser</value>
46
     			<value>prov_hasSources</value>
46
     			<!-- <value>prov_hasSources</value> -->
47 47
     			<value>prov_hasDerivations</value>
48 48
     			<value>prov_instanceOfClass</value>
49 49
     		</list>
metacat-index/src/test/java/edu/ucsb/nceas/metacat/index/annotation/MetacatRdfXmlSubprocessorTest.java
55 55
                } else if (newId.equals("urn:uuid:9ceeaeb3-6ef3-4b1e-bc4d-96e299fab3a4")) {
56 56
                    SolrElementField field1 = resultSolrDoc.getField("prov_used");
57 57
                    //assertTrue(" the used value should be urn:uuid:621a115f-f1ed-4bef-bca5-f8741793a540. But the real value is "+field1.getValue(), field1.getValue().equals("urn:uuid:621a115f-f1ed-4bef-bca5-f8741793a540"));
58
                } else if (newId.equals("urn:uuid:d2fcd5c0-2755-411e-b969-0b5f8eb47d75")) {
59
                    list = resultSolrDoc.getAllFieldValues("prov_hasSources");
60
                    assertTrue("The list must contain urn:uuid:ee635a61-c930-444d-8214-db65178a1a47", list.contains("urn:uuid:ee635a61-c930-444d-8214-db65178a1a47"));
61
                    assertTrue("The list must contain ", list.contains("urn:uuid:23495598-d50b-4317-b0e1-05a9d9e52632"));
62
                    assertTrue("The list must contain ", list.contains("urn:uuid:672ba6c5-8812-4c05-a324-246af172c67a"));
63
                    assertTrue("The list must contain ", list.contains("urn:uuid:e534b2ab-3a1b-44ed-8a99-ce54a0487aea"));
64 58
                } else if (newId.equals("urn:uuid:621a115f-f1ed-4bef-bca5-f8741793a540")) {
65 59
                    List<String>list = resultSolrDoc.getAllFieldValues("prov_wasDerivedFrom");
66 60
                    assertTrue("The list must contain urn:uuid:ee635a61-c930-444d-8214-db65178a1a47", list.contains("urn:uuid:ee635a61-c930-444d-8214-db65178a1a47"));

Also available in: Unified diff