feat:完善项目信息
This commit is contained in:
@ -30,7 +30,7 @@ func (this *ESManage) Create() error {
|
||||
return es.Create(this.Index(), _bytes)
|
||||
}
|
||||
|
||||
func (this *ESManage) Search(page, pageSize int) (interface{}, error) {
|
||||
func (this *ESManage) Search(page, pageSize int, params map[string]interface{}) (interface{}, error) {
|
||||
termParams := make(map[string]interface{}, 0)
|
||||
shouldParams := make(map[string]interface{}, 0)
|
||||
|
||||
@ -46,6 +46,11 @@ func (this *ESManage) Search(page, pageSize int) (interface{}, error) {
|
||||
if this.Research != "" {
|
||||
shouldParams["research"] = this.Research
|
||||
}
|
||||
if len(params) > 0 {
|
||||
for k, v := range params {
|
||||
shouldParams[k] = v
|
||||
}
|
||||
}
|
||||
out, err := es.Search(this, this.Index(), &es.SearchParams{
|
||||
TermParams: termParams,
|
||||
ShouldParams: shouldParams,
|
||||
|
Reference in New Issue
Block a user