Fixed bug where after reconciling by ID, GUID, or key would generate a buggy numeric range facet, since all the scores were artificially the same.

git-svn-id: http://google-refine.googlecode.com/svn/trunk@454 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
David Huynh 2010-04-12 22:19:44 +00:00
parent 7ab1acd801
commit 8b95248c75
2 changed files with 16 additions and 12 deletions

View File

@ -125,7 +125,7 @@ public class NumericBinIndex {
if (_min >= _max) { if (_min >= _max) {
_step = 1; _step = 1;
_min = 0; _min = Math.min(_min, _max);
_max = _step; _max = _step;
_bins = new int[1]; _bins = new int[1];

View File

@ -24,6 +24,7 @@ import com.metaweb.gridworks.model.Recon;
import com.metaweb.gridworks.model.Row; import com.metaweb.gridworks.model.Row;
import com.metaweb.gridworks.model.changes.CellChange; import com.metaweb.gridworks.model.changes.CellChange;
import com.metaweb.gridworks.model.changes.ReconChange; 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.ReconConfig;
import com.metaweb.gridworks.model.recon.ReconJob; import com.metaweb.gridworks.model.recon.ReconJob;
import com.metaweb.gridworks.process.LongRunningProcess; import com.metaweb.gridworks.process.LongRunningProcess;
@ -137,17 +138,20 @@ public class ReconOperation extends EngineDependentOperation {
writer.key("scroll"); writer.value(false); writer.key("scroll"); writer.value(false);
writer.endObject(); writer.endObject();
writer.endObject(); writer.endObject();
writer.object();
writer.key("action"); writer.value("createFacet"); if (_reconConfig instanceof HeuristicReconConfig) {
writer.key("facetType"); writer.value("range"); writer.object();
writer.key("facetConfig"); writer.key("action"); writer.value("createFacet");
writer.object(); writer.key("facetType"); writer.value("range");
writer.key("name"); writer.value(_columnName + ": best candidate's score"); writer.key("facetConfig");
writer.key("columnName"); writer.value(_columnName); writer.object();
writer.key("expression"); writer.value("cell.recon.best.score"); writer.key("name"); writer.value(_columnName + ": best candidate's score");
writer.key("mode"); writer.value("range"); writer.key("columnName"); writer.value(_columnName);
writer.endObject(); writer.key("expression"); writer.value("cell.recon.best.score");
writer.endObject(); writer.key("mode"); writer.value("range");
writer.endObject();
writer.endObject();
}
writer.endArray(); writer.endArray();
writer.endObject(); writer.endObject();
} }