Skip to content

Commit

Permalink
NewSearchBody関数を外部に公開しないように
Browse files Browse the repository at this point in the history
  • Loading branch information
ikura-hamu committed Aug 4, 2023
1 parent 756f714 commit 2126791
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions service/search/es.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ type searchBody struct {
} `json:"query,omitempty"`
}

func NewSearchBody(sq []searchQuery) searchBody {
func newSearchBody(sq []searchQuery) searchBody {
sb := searchBody{
Query: &struct {
Bool *struct {
Expand Down Expand Up @@ -389,7 +389,7 @@ func (e *esEngine) Do(q *Query) (Result, error) {
// NOTE: 現状`sort.Key`はそのままesのソートキーとして使える前提
sort := q.GetSortKey()

b, err := json.Marshal(NewSearchBody(musts))
b, err := json.Marshal(newSearchBody(musts))
if err != nil {
return nil, fmt.Errorf("failed to marshal search query: %w", err)
}
Expand Down

0 comments on commit 2126791

Please sign in to comment.