Changeset 38109 for gs3-extensions/solr
- Timestamp:
- 2023-09-13T11:27:56+12:00 (8 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs3-extensions/solr/trunk/src/src/java/org/greenstone/gsdl3/util/SolrFacetWrapper.java
r32085 r38109 26 26 package org.greenstone.gsdl3.util; 27 27 28 import java.util.HashMap; 28 import java.util.ArrayList; 29 import java.util.List; 29 30 30 31 import org.apache.solr.client.solrj.response.FacetField; … … 32 33 public class SolrFacetWrapper extends FacetWrapper 33 34 { 34 protected HashMap<String, Long> _counts = new HashMap<String, Long>(); 35 35 36 protected ArrayList<FacetWrapper.FacetCount> _counts = new ArrayList<FacetWrapper.FacetCount>(); 36 37 public SolrFacetWrapper(FacetField facet) 37 38 { … … 40 41 for(FacetField.Count count : facet.getValues()) 41 42 { 42 _counts.put(count.getName(), count.getCount()); 43 44 _counts.add(new FacetWrapper.FacetCount(count.getName(), count.getCount())); 43 45 } 44 46 } 45 47 46 public HashMap<String, Long> getCounts() 47 { 48 return _counts; 49 } 48 49 public List<FacetWrapper.FacetCount> getCounts() 50 { 51 return _counts; 52 } 50 53 }
Note:
See TracChangeset
for help on using the changeset viewer.