Ignore:
Timestamp:
2023-09-13T11:20:33+12:00 (8 months ago)
Author:
kjdon
Message:

we don't want to put counts into a hashmap, as this throws away the ordering that solr has returned facets in. lets use a list of FacetCounts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/FacetWrapper.java

    r32081 r38105  
    2626package org.greenstone.gsdl3.util;
    2727
    28 import java.util.HashMap;
     28import java.util.List;
    2929
    3030public abstract class FacetWrapper
     
    4747    _display_name = dname;
    4848  }
    49  
    50     public abstract HashMap<String, Long> getCounts();
     49
     50    public class FacetCount {
     51    public String name = null;
     52    public long count = 0;
     53
     54    public FacetCount(String n, long c) {
     55        name = n;
     56        count = c;
     57    }
     58    }
     59
     60    public abstract List<FacetWrapper.FacetCount> getCounts();
    5161}
Note: See TracChangeset for help on using the changeset viewer.