Changeset 6287
- Timestamp:
- 06/12/15 07:35:11 (9 years ago)
- Location:
- vlo/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
vlo/trunk/vlo-importer/src/main/java/eu/clarin/cmdi/vlo/importer/CountryNamePostProcessor.java
r5982 r6287 3 3 import eu.clarin.cmdi.vlo.CommonUtils; 4 4 import java.util.ArrayList; 5 import java.util.HashMap; 5 6 import java.util.List; 6 7 import java.util.Map; … … 15 16 16 17 /** 17 * Returns the country name based on the mapping defined in the CMDI component: 18 * http://catalog.clarin.eu/ds/ComponentRegistry/?item=clarin.eu:cr1:c_1271859438104 If no mapping is found the original value is 19 * returned. 18 * Returns the country name based on the mapping defined in the CMDI 19 * component: 20 * http://catalog.clarin.eu/ds/ComponentRegistry/?item=clarin.eu:cr1:c_1271859438104 21 * If no mapping is found the original value is returned. 22 * 20 23 * @param value extracted "country" value from CMDI file 21 24 * @return List of country names … … 48 51 return result; 49 52 } catch (Exception e) { 50 throw new RuntimeException("Cannot instantiate postProcessor:", e); 53 if (CommonUtils.SWALLOW_LOOKUP_ERRORS) { 54 return new HashMap<String, String>(); 55 } else { 56 throw new RuntimeException("Cannot instantiate postProcessor:", e); 57 } 51 58 } 52 59 } -
vlo/trunk/vlo-importer/src/main/java/eu/clarin/cmdi/vlo/importer/MetadataImporter.java
r6214 r6287 418 418 + resource.getResourceName()); 419 419 } 420 solrDocument.addField(FacetConstants.FIELD_RESOURCE_COUNT, resources.size()); 420 421 } 421 422 … … 481 482 partialUpdate.put("set", incomingVertexNames); 482 483 doc.setField(FacetConstants.FIELD_HAS_PART, partialUpdate); 484 doc.setField(FacetConstants.FIELD_HAS_PART_COUNT, incomingVertexNames.size()); 483 485 } 484 486 -
vlo/trunk/vlo-solr/src/main/solr_conf/solr/collection1/conf/schema.xml
r6284 r6287 442 442 <field name="_fileName" type="string" indexed="true" stored="true" multiValued="false" /> 443 443 <field name="_resourceRef" type="string" indexed="true" stored="true" multiValued="true" /> 444 <field name="_resourceRefCount" type="int" indexed="true" stored="true" multiValued="false" /> 444 445 <field name="_componentProfile" type="string" indexed="true" stored="true" multiValued="false" /> 445 446 <field name="_contentSearchRef" type="string" indexed="true" stored="true" multiValued="true" /> … … 449 450 <field name="_isPartOf" type="string" indexed="true" stored="true" multiValued="true" /> 450 451 <field name="_hasPart" type="string" indexed="true" stored="true" multiValued="true" /> 452 <field name="_hasPartCount" type="int" indexed="true" stored="true" multiValued="false" /> 451 453 <field name="_hierarchyWeight" type="int" indexed="true" stored="true" multiValued="false" default='0'/> 452 454 <field name="metadataSource" type="metadataSource" indexed="false" stored="true" multiValued="true" /> -
vlo/trunk/vlo-solr/src/main/solr_conf/solr/collection1/conf/solrconfig.xml
r6284 r6287 384 384 <!-- Boost fields (boost based on field value regardless of query) --> 385 385 <str name="bf"> 386 <!-- boost by hierarchy weight (reverse order because lower numbers indicate a higher level --> 387 rord(_hierarchyWeight) 388 <!-- TODO: use bf to boost records with one or more resources? --> 386 <!-- 387 boost by hierarchy weight (reverse order because lower numbers 388 indicate a higher level), then by number of parts, then by 389 number of resources --> 390 rord(_hierarchyWeight) log(add(1,_hasPartCount))^.1 <!-- todo: deal with -infinity --> 391 <!-- TODO: prefer CLARIN records over non-CLARIN? --> 392 <!-- TODO: boost records with one or more resources (_resourceRefCount) --> 389 393 </str> 390 394
Note: See TracChangeset
for help on using the changeset viewer.