|
|
@ -145,6 +145,7 @@ func (d *Dao) QuerySearch(indexName, query string, offset, limit int) (*zinc.Que
|
|
|
|
"content": query,
|
|
|
|
"content": query,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
"sort": []string{"-is_top", "-latest_replied_on"},
|
|
|
|
"from": offset,
|
|
|
|
"from": offset,
|
|
|
|
"size": limit,
|
|
|
|
"size": limit,
|
|
|
|
})
|
|
|
|
})
|
|
|
@ -161,7 +162,7 @@ func (d *Dao) QueryTagSearch(indexName, query string, offset, limit int) (*zinc.
|
|
|
|
"query": map[string]interface{}{
|
|
|
|
"query": map[string]interface{}{
|
|
|
|
"term": "tags." + query + ":1",
|
|
|
|
"term": "tags." + query + ":1",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"sort": []string{"-is_top", "-latest_replied_on"},
|
|
|
|
"sort_fields": []string{"-is_top", "-latest_replied_on"},
|
|
|
|
"from": offset,
|
|
|
|
"from": offset,
|
|
|
|
"max_results": limit,
|
|
|
|
"max_results": limit,
|
|
|
|
})
|
|
|
|
})
|
|
|
|