@@ -72,7 +72,11 @@ func (e *Article) GetJsonList(list string) error {
query = query + `"TERM_` + class + `":"` + contenttype + `"`
}
if len(search) > 0 {
- query = query + `,"s_title":"` + search + `"`
+ if len(contenttype) > 0 {
+ query = query + `,"s_title":"` + search + `"`
+ } else {
+ query = query + `"s_title":"` + search + `"`
+ }
query = query + `}`
res["totalRows"] = elastic.Count("content", "content", elastic.MakeQuery(query, "", "", -1, -1))