Skip to content

Commit a1f2b3e

Browse files
Emit numeric range and date range facets for SearchResult's String() (#1764)
Fixes: #1763
1 parent 5728b8a commit a1f2b3e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

search.go

+6
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,12 @@ func (sr *SearchResult) String() string {
547547
for _, t := range f.Terms.Terms() {
548548
rv += fmt.Sprintf("\t%s(%d)\n", t.Term, t.Count)
549549
}
550+
for _, n := range f.NumericRanges {
551+
rv += fmt.Sprintf("\t%s(%d)\n", n.Name, n.Count)
552+
}
553+
for _, d := range f.DateRanges {
554+
rv += fmt.Sprintf("\t%s(%d)\n", d.Name, d.Count)
555+
}
550556
if f.Other != 0 {
551557
rv += fmt.Sprintf("\tOther(%d)\n", f.Other)
552558
}

0 commit comments

Comments
 (0)