Skip to content

Commit

Permalink
support basic search of dv subject and affiliation IQSS#1431
Browse files Browse the repository at this point in the history
  • Loading branch information
pdurbin committed Feb 7, 2015
1 parent 114394a commit b6d6425
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions conf/solr/4.6.0/schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,9 @@
<!-- Added for Dataverse 4.0 Beta: make variable names and labels searchable in basic search https://redmine.hmdc.harvard.edu/issues/3945 -->
<copyField source="variable_name_en" dest="text" maxChars="3000"/>
<copyField source="variable_label_en" dest="text" maxChars="3000"/>
<!-- Make dataverse subject and affiliation searchable from basic search: https://github.com/IQSS/dataverse/issues/1431 -->
<copyField source="dvSubject_en" dest="text" maxChars="3000"/>
<copyField source="dvAffiliation_en" dest="text" maxChars="3000"/>

<!-- Added for Dataverse 4.0 alpha 1 from output of http://localhost:8080/api/config/solr/schema -->
<field name="ARCS1" type="text_en" multiValued="false" stored="true" indexed="true"/>
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/edu/harvard/iq/dataverse/SearchServiceBean.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ public SolrQueryResponse search(User user, Dataverse dataverse, String query, Li
solrFieldsToHightlightOnMap.put(SearchFields.VARIABLE_LABEL, "Variable Label");
solrFieldsToHightlightOnMap.put(SearchFields.FILE_TYPE_SEARCHABLE, "File Type");
solrFieldsToHightlightOnMap.put(SearchFields.DATASET_PUBLICATION_DATE, "Publication Date");
/**
* @todo Dataverse subject and affiliation should be highlighted but
* this is commented out right now because the "friendly" names are not
* being shown on the dataverse cards. See also
* https://github.com/IQSS/dataverse/issues/1431
*/
// solrFieldsToHightlightOnMap.put(SearchFields.DATAVERSE_SUBJECT, "Subject");
// solrFieldsToHightlightOnMap.put(SearchFields.DATAVERSE_AFFILIATION, "Affiliation");
/**
* @todo: show highlight on file card?
* https://redmine.hmdc.harvard.edu/issues/3848
Expand Down

0 comments on commit b6d6425

Please sign in to comment.