@Test public void merge() { Map<String, List<String>> highlightFragments = StringListMap.of(new String[][] { { "content", "some text some text", "other text content", "yet another text" }, }); String actualMerged = highlightFragmentsMerger.merge(highlightFragments, JudgmentIndexField.CONTENT); assertEquals("some text some text ... other text content ... yet another text", actualMerged); }
public String merge(Map<String, List<String>> highlightedData, F field) { List<String> fieldHighlightedData = fetchFieldHighlightedData(highlightedData, field); return fieldHighlightedData.stream() .collect(Collectors.joining(FRAGMENTS_DELIMITER)); }
SolrHighlightFragmentsMerger { public String merge(Map<String, List<String>> highlightedData, F field) { List<String> fieldHighlightedData = fetchFieldHighlightedData(highlightedData, field); return fieldHighlightedData.stream() .collect(Collectors.joining(FRAGMENTS_DELIMITER)); } }
SolrHighlightFragmentsMerger { public String merge(Map<String, List<String>> highlightedData, F field) { List<String> fieldHighlightedData = fetchFieldHighlightedData(highlightedData, field); return fieldHighlightedData.stream() .collect(Collectors.joining(FRAGMENTS_DELIMITER)); }  }
SolrHighlightFragmentsMerger { public String merge(Map<String, List<String>> highlightedData, F field) { List<String> fieldHighlightedData = fetchFieldHighlightedData(highlightedData, field); return fieldHighlightedData.stream() .collect(Collectors.joining(FRAGMENTS_DELIMITER)); }  String merge(Map<String, List<String>> highlightedData, F field); }
SolrHighlightFragmentsMerger { public String merge(Map<String, List<String>> highlightedData, F field) { List<String> fieldHighlightedData = fetchFieldHighlightedData(highlightedData, field); return fieldHighlightedData.stream() .collect(Collectors.joining(FRAGMENTS_DELIMITER)); }  String merge(Map<String, List<String>> highlightedData, F field);  }