Skip to content

Commit dde52b8

Browse files
committed
Feature #13448
Take into the change in the way to build an IndexEntry object.
1 parent 08aa3be commit dde52b8

File tree

17 files changed

+233
-304
lines changed

17 files changed

+233
-304
lines changed

almanach/almanach-war/src/main/java/org/silverpeas/components/almanach/ResultSearchRenderer.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ public String getResultContent(SearchResultContentVO searchResult) {
7979

8080
// Retrieve the event detail from silverResult
8181
final GlobalSilverResult silverResult = searchResult.getGsr();
82-
final CalendarEvent event = CalendarEvent.getById(silverResult.getId());
82+
final String id = silverResult.isLinked() ? silverResult.getLinkedResourceId() :
83+
silverResult.getId();
84+
final CalendarEvent event = CalendarEvent.getById(id);
8385
// Create a SilverpeasTemplate
8486
final SilverpeasTemplate template = getNewTemplate();
8587
this.setCommonAttributes(searchResult, template);

classifieds/classifieds-library/src/main/java/org/silverpeas/components/classifieds/service/DefaultClassifiedService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,8 @@ private void createIndex(ClassifiedDetail classified) {
368368
private void createIndex(ClassifiedDetail classified, PublicationTemplate template) {
369369
FullIndexEntry indexEntry;
370370
if (classified != null) {
371-
indexEntry = new FullIndexEntry(classified.getInstanceId(), CLASSIFIED_TYPE,
372-
Integer.toString(classified.getClassifiedId()));
371+
indexEntry = new FullIndexEntry(new IndexEntryKey(classified.getInstanceId(), CLASSIFIED_TYPE,
372+
Integer.toString(classified.getClassifiedId())));
373373
indexEntry.setTitle(classified.getTitle());
374374
indexEntry.setPreview(classified.getDescription());
375375
indexEntry.setCreationDate(classified.getCreationDate());

0 commit comments

Comments
 (0)