diff --git a/src/main/java/com/metaweb/gridworks/browsing/facets/NumericBinIndex.java b/src/main/java/com/metaweb/gridworks/browsing/facets/NumericBinIndex.java index 62c6339a4..6166c1a69 100644 --- a/src/main/java/com/metaweb/gridworks/browsing/facets/NumericBinIndex.java +++ b/src/main/java/com/metaweb/gridworks/browsing/facets/NumericBinIndex.java @@ -125,7 +125,7 @@ public class NumericBinIndex { if (_min >= _max) { _step = 1; - _min = 0; + _min = Math.min(_min, _max); _max = _step; _bins = new int[1]; diff --git a/src/main/java/com/metaweb/gridworks/operations/ReconOperation.java b/src/main/java/com/metaweb/gridworks/operations/ReconOperation.java index ae29a582a..a08dcbffc 100644 --- a/src/main/java/com/metaweb/gridworks/operations/ReconOperation.java +++ b/src/main/java/com/metaweb/gridworks/operations/ReconOperation.java @@ -24,6 +24,7 @@ import com.metaweb.gridworks.model.Recon; import com.metaweb.gridworks.model.Row; import com.metaweb.gridworks.model.changes.CellChange; import com.metaweb.gridworks.model.changes.ReconChange; +import com.metaweb.gridworks.model.recon.HeuristicReconConfig; import com.metaweb.gridworks.model.recon.ReconConfig; import com.metaweb.gridworks.model.recon.ReconJob; import com.metaweb.gridworks.process.LongRunningProcess; @@ -137,17 +138,20 @@ public class ReconOperation extends EngineDependentOperation { writer.key("scroll"); writer.value(false); writer.endObject(); writer.endObject(); - writer.object(); - writer.key("action"); writer.value("createFacet"); - writer.key("facetType"); writer.value("range"); - writer.key("facetConfig"); - writer.object(); - writer.key("name"); writer.value(_columnName + ": best candidate's score"); - writer.key("columnName"); writer.value(_columnName); - writer.key("expression"); writer.value("cell.recon.best.score"); - writer.key("mode"); writer.value("range"); - writer.endObject(); - writer.endObject(); + + if (_reconConfig instanceof HeuristicReconConfig) { + writer.object(); + writer.key("action"); writer.value("createFacet"); + writer.key("facetType"); writer.value("range"); + writer.key("facetConfig"); + writer.object(); + writer.key("name"); writer.value(_columnName + ": best candidate's score"); + writer.key("columnName"); writer.value(_columnName); + writer.key("expression"); writer.value("cell.recon.best.score"); + writer.key("mode"); writer.value("range"); + writer.endObject(); + writer.endObject(); + } writer.endArray(); writer.endObject(); }