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

modify

parent 50c3645f
...@@ -28,7 +28,9 @@ class GroupUtils(object): ...@@ -28,7 +28,9 @@ class GroupUtils(object):
q['query'] = { q['query'] = {
'bool': { 'bool': {
"must": { "must": {
"is_online": True "term":{
"is_online": True
}
}, },
"should": [ "should": [
{'multi_match': multi_match} {'multi_match': multi_match}
...@@ -52,7 +54,9 @@ class GroupUtils(object): ...@@ -52,7 +54,9 @@ class GroupUtils(object):
q["query"] = { q["query"] = {
"bool":{ "bool":{
"must":{ "must":{
"is_online":True "term":{
"is_online": True
}
} }
} }
} }
...@@ -78,10 +82,15 @@ class GroupUtils(object): ...@@ -78,10 +82,15 @@ class GroupUtils(object):
q = dict() q = dict()
q["query"] = { q["query"] = {
"bool":{ "bool":{
"must":{ "should":[
"is_online":True, {"term":{
"user_id":user_id "is_online": True
} }},
{"term":{
"user_id":user_id
}}
],
"minimum_should_match":2
} }
} }
q["_source"] = { q["_source"] = {
......
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