Skip to content

Commit 3627eb3

Browse files
committed
don't use SI for < 1000 docs. never for indexes.
Also fixed a typo: 100 instead of 1000 sample documents.
1 parent 1653d17 commit 3627eb3

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

scout-ui/src/collection-stats/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ var CollectionStatsView = AmpersandView.extend({
2929
document_count: {
3030
deps: ['model.document_count'],
3131
fn: function() {
32-
return numeral(this.model.document_count).format('0.0a');
32+
var format = (this.model.document_count > 1000) ? '0.0a' : '0';
33+
return numeral(this.model.document_count).format(format);
3334
}
3435
},
3536
document_size: {
@@ -47,7 +48,7 @@ var CollectionStatsView = AmpersandView.extend({
4748
index_count: {
4849
deps: ['model.index_count'],
4950
fn: function() {
50-
return numeral(this.model.index_count).format('0.0a');
51+
return numeral(this.model.index_count).format('0');
5152
}
5253
},
5354
index_size: {

scout-ui/src/home/collection.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.collection-view
22
.sampling-status
3-
span This report is based on a sample of 1000 documents. #[a(href='#') Learn More]
3+
span This report is based on a sample of 100 documents. #[a(href='#') Learn More]
44
header
55
.row
66
.col-md-6

0 commit comments

Comments
 (0)