Skip to content

Commit

Permalink
fix: Expose missing maxFacetHits as setting
Browse files Browse the repository at this point in the history
  • Loading branch information
aseure committed Feb 5, 2018
1 parent 5fab01d commit 1c59801
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions algoliasearch/types_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ func (s *Settings) clean() {
if s.TypoTolerance == "" {
s.TypoTolerance = "true"
}

if s.MaxFacetHits == 0 {
s.MaxFacetHits = 10
}
}

// ToMap produces a `Map` corresponding to the `Settings struct`. It should
Expand Down Expand Up @@ -115,6 +119,7 @@ func (s *Settings) ToMap() Map {
"highlightPostTag": s.HighlightPostTag,
"highlightPreTag": s.HighlightPreTag,
"hitsPerPage": s.HitsPerPage,
"maxFacetHits": s.MaxFacetHits,
"maxValuesPerFacet": s.MaxValuesPerFacet,
"minProximity": s.MinProximity,
"minWordSizefor1Typo": s.MinWordSizefor1Typo,
Expand Down

0 comments on commit 1c59801

Please sign in to comment.