Skip to content

Commit

Permalink
Dirty temporary hack for Solr9 bug
Browse files Browse the repository at this point in the history
See:
#449
  • Loading branch information
thomasegense committed Mar 27, 2024
1 parent df7382b commit 1ad267b
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ public class DomainStatisticsForDomainParser {
public static Map<String,List<FacetCount>> parseDomainStatisticsJson(String jsonString){
Map<String,List<FacetCount>> yearFacetDomainCountMap = new HashMap<String,List<FacetCount>>();

//Ugly quick hack for v.5.1.0 release.
//Solr 9 returns highlight attribute twice, and this is not allowed in json and parsing will fail.
//see https://github.com/netarchivesuite/solrwayback/issues/449
jsonString=jsonString.replaceFirst("\"highlighting\"", "\"highlighting1\"");//Rename first to highlighting1 HACK!


JSONObject json = new JSONObject(jsonString);
JSONObject jsonFacets = JsonUtils.getSubObjectIfExists(json, "facets");
Expand Down

0 comments on commit 1ad267b

Please sign in to comment.