package org.lumongo.server.searching;

public class FacetCountResult implements Comparable<FacetCountResult> {
	private String facet;
	private long count;
	
	public FacetCountResult(String facet, long count) {
		this.facet = facet;
		this.count = count;
	}
	
	public String getFacet() {
		return facet;
	}
	
	public void setFacet(String facet) {
		this.facet = facet;
	}
	
	public long getCount() {
		return count;
	}
	
	public void setCount(long count) {
		this.count = count;
	}
	
	@Override
	public int compareTo(FacetCountResult o) {
		return Long.compare(o.count, this.count);
	}
	
}

@@ -476,17 +476,20 @@
 t;%0A%09%7D%0A%09%0A
-%09
+    
 @Overrid
@@ -490,17 +490,20 @@
 verride%0A
-%09
+    
 public i
@@ -541,55 +541,507 @@
 ) %7B%0A
-%09%09return Long.compare(o.count, this.c
+        int compareCount = Long.compare(this.count, o.count);%0A        if (compareCount == 0) %7B%0A            return this.facet.compareTo(o.facet);%0A        %7D%0A        return compareC
 ount
-)
 ;%0A
-%09%7D%0A%09
+    %7D%0A%0A%09    %0A    @Override%0A    public boolean equals(Object obj) %7B%0A        if (obj instanceof FacetCountResult) %7B%0A            return (compareTo((FacetCountResult) obj) == 0);%0A        %7D%0A        return false;%0A    %7D%0A    %0A    @Override%0A    public int hashCode() %7B     %0A        return facet.hashCode() + (int)count;%0A    %7D
 %0A%7D%0A

fix faceting bug introduced in r136