Skip to content

Commit

Permalink
Added doc and changed autocomplete.custom.format to `autocomplete.c…
Browse files Browse the repository at this point in the history
…ustom.separator` for proper naming.
  • Loading branch information
milanmajchrak committed Sep 24, 2024
1 parent 8de895c commit ae27d91
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dspace-api/src/test/data/dspaceFolder/config/local.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -308,4 +308,4 @@ signposting.enabled = true
# Test configuration has only EN locale (submission-forms.xml)
webui.supported.locales = en

autocomplete.custom.format.solr-subject_ac = \\|\\|\\|
autocomplete.custom.separator.solr-subject_ac = \\|\\|\\|
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
@RequestMapping("/api/suggestions")
public class SuggestionRestController extends AbstractDSpaceRestRepository {

private static final String AUTOCOMPLETE_CUSTOM_CFG_FORMAT_PREFIX = "autocomplete.custom.format.";
private static final String AUTOCOMPLETE_CUSTOM_CFG_FORMAT_PREFIX = "autocomplete.custom.separator.";
private static final String AUTOCOMPLETE_CUSTOM_SOLR_PREFIX = "solr-";

@Autowired
Expand Down Expand Up @@ -147,7 +147,7 @@ private VocabularyEntryRest formatValue(VocabularyEntryRest ver, String autocomp
return ver;
}

// Load separator from the configuration `autocomplete.custom.format.<autocompleteCustom>
// Load separator from the configuration `autocomplete.custom.separator.<autocompleteCustom>
String separator = configurationService.getProperty(AUTOCOMPLETE_CUSTOM_CFG_FORMAT_PREFIX + autocompleteCustom);
if (StringUtils.isEmpty(separator)) {
return ver;
Expand Down
10 changes: 7 additions & 3 deletions dspace/config/clarin-dspace.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,11 @@ elg.download-location.exposed = 0
#download.email.cc = ${info.recipient}
download.email.cc = ${mail.admin}

#### Submission forms ####
# `autocomplete.custom.separator.*` is a special separator used to distinguish values
# in the results from the current Solr index. For example, `solr-subject_ac` is a special index for subjects,
# and its values look like this: `value1 ||| VALUE1`. The correct value is the second one.
# `//` is because of special character
autocomplete.custom.format.solr-subject_ac = \\|\\|\\|
autocomplete.custom.format.solr-publisher_ac = \\|\\|\\|
autocomplete.custom.format.solr-dataProvider_ac = \\|\\|\\|
autocomplete.custom.separator.solr-subject_ac = \\|\\|\\|
autocomplete.custom.separator.solr-publisher_ac = \\|\\|\\|
autocomplete.custom.separator.solr-dataProvider_ac = \\|\\|\\|

0 comments on commit ae27d91

Please sign in to comment.