Move score to underscore'd property.

This commit is contained in:
Young Hahn
2013-12-13 04:16:44 -05:00
parent da8cc54128
commit f324b4d0b5

View File

@@ -632,9 +632,11 @@ MBTiles.prototype.getIndexableDocs = function(pointer, callback) {
doc._text = text;
doc._zxy = row.zxy ? tms2zxy(row.zxy) : [];
doc._center = [doc.lon, doc.lat];
if (doc.score) doc._score = parseFloat(doc.score);
if (doc.bounds) doc._bbox = doc.bounds.split(',').map(function(v) { return parseFloat(v) });
delete doc.lon;
delete doc.lat;
delete doc.score;
delete doc.bounds;
docs.push(doc);
}