@@ -21,15 +21,13 @@ type SuggestService struct {
21
21
routing string
22
22
preference string
23
23
indices []string
24
- types []string
25
24
suggesters []Suggester
26
25
}
27
26
28
27
func NewSuggestService (client * Client ) * SuggestService {
29
28
builder := & SuggestService {
30
29
client : client ,
31
30
indices : make ([]string , 0 ),
32
- types : make ([]string , 0 ),
33
31
suggesters : make ([]Suggester , 0 ),
34
32
}
35
33
return builder
@@ -45,16 +43,6 @@ func (s *SuggestService) Indices(indices ...string) *SuggestService {
45
43
return s
46
44
}
47
45
48
- func (s * SuggestService ) Type (typ string ) * SuggestService {
49
- s .types = append (s .types , typ )
50
- return s
51
- }
52
-
53
- func (s * SuggestService ) Types (types ... string ) * SuggestService {
54
- s .types = append (s .types , types ... )
55
- return s
56
- }
57
-
58
46
func (s * SuggestService ) Pretty (pretty bool ) * SuggestService {
59
47
s .pretty = pretty
60
48
return s
@@ -91,15 +79,6 @@ func (s *SuggestService) Do() (SuggestResult, error) {
91
79
}
92
80
urls += strings .Join (indexPart , "," )
93
81
94
- // Types part
95
- typesPart := make ([]string , 0 )
96
- for _ , typ := range s .types {
97
- typesPart = append (typesPart , cleanPathString (typ ))
98
- }
99
- if len (typesPart ) > 0 {
100
- urls += "/" + strings .Join (typesPart , "," )
101
- }
102
-
103
82
// Suggest
104
83
urls += "/_suggest"
105
84
0 commit comments