Skip to content

Commit

Permalink
new solr field for replaces/replaced autocomplete
Browse files Browse the repository at this point in the history
handle_title_ac equals handle:title
  • Loading branch information
kosarko committed Aug 1, 2017
1 parent e093679 commit 471fb5b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,11 @@ else if (filter
}
document.addField(field + "_comp", value);
}

//create handle_title_ac field
String title = item.getName();
String handle = item.getHandle();
document.addField("handle_title_ac", handle + ":" + title);
}
}
}
4 changes: 2 additions & 2 deletions dspace/config/input-forms.xml
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@
<label>input_forms.field.dc.relation.replaces.label</label>
<input-type>onebox</input-type>
<hint>input_forms.field.dc.relation.replaces.hint</hint>
<autocomplete>solr-handle</autocomplete>
<autocomplete>solr-handle_title_ac</autocomplete>
<required/>
<component-label> </component-label>
<collapsible>Special fields</collapsible>
Expand All @@ -410,7 +410,7 @@
<label>input_forms.field.dc.relation.isreplacedby.label</label>
<input-type>onebox</input-type>
<hint>input_forms.field.dc.relation.isreplacedby.hint</hint>
<autocomplete>solr-handle</autocomplete>
<autocomplete>solr-handle_title_ac</autocomplete>
<required/>
<component-label> </component-label>
<acl>
Expand Down

0 comments on commit 471fb5b

Please sign in to comment.