Commit dc5a4b9e authored by 段英荣's avatar 段英荣

Merge branch 'dev' into 'master'

modify

See merge request !57
parents 2579d927 f642d52d
......@@ -11,6 +11,15 @@ from libs.es import ESPerform
from libs.cache import redis_client
from search.utils.common import *
def get_highlight(fields=[]):
field_highlight = {
'fields': {k: {} for k in fields},
'pre_tags': ['<%s>' % 'ems'],
'post_tags': ['</%s>' % 'ems'],
}
return field_highlight
@bind("physical/search/query_tag")
def query_tag(query,offset,size):
try:
......@@ -24,6 +33,7 @@ def query_tag(query,offset,size):
"include":["id","name"]
}
}
q["highlight"] = get_highlight(["name"])
ret_list = list()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment