Recognise queries

This commit is contained in:
2022-08-15 19:39:26 +01:00
parent a43bb5e861
commit fdcfc715c8
2 changed files with 32 additions and 17 deletions

View File

@@ -31,8 +31,8 @@ def construct_query(index, net, channel, src, num, size, type=None, nicks=None):
extra_must.remove({"match": {"channel": channel}})
extra_should2 = []
# Type is one of msg or notice
#extra_should.append({"match": {"mtype": "msg"}})
#extra_should.append({"match": {"mtype": "notice"}})
# extra_should.append({"match": {"mtype": "msg"}})
# extra_should.append({"match": {"mtype": "notice"}})
extra_should.append({"match": {"type": "znc"}})
extra_should.append({"match": {"type": "self"}})
@@ -43,8 +43,8 @@ def construct_query(index, net, channel, src, num, size, type=None, nicks=None):
extra_must.remove({"match": {"channel": channel}})
extra_should2 = []
extra_should2.append({"match": {"nick": channel}})
#extra_should2.append({"match": {"mtype": "msg"}})
#extra_should2.append({"match": {"mtype": "notice"}})
# extra_should2.append({"match": {"mtype": "msg"}})
# extra_should2.append({"match": {"mtype": "notice"}})
extra_should.append({"match": {"type": "query"}})
extra_should2.append({"match": {"type": "self"}})