signature_valid->is_signature_valid

This commit is contained in:
Victor Shyba 2021-08-11 00:53:16 -03:00
parent 5757edfb9e
commit 87b3db5d98

View file

@ -454,12 +454,12 @@ func (s *Server) setupEsQuery(
if in.HasChannelSignature != nil && in.HasChannelSignature.Value { if in.HasChannelSignature != nil && in.HasChannelSignature.Value {
q = q.Must(elastic.NewExistsQuery("signature_digest")) q = q.Must(elastic.NewExistsQuery("signature_digest"))
if in.SignatureValid != nil { if in.SignatureValid != nil {
q = q.Must(elastic.NewTermQuery("signature_valid", in.SignatureValid.Value)) q = q.Must(elastic.NewTermQuery("is_signature_valid", in.SignatureValid.Value))
} }
} else if in.SignatureValid != nil { } else if in.SignatureValid != nil {
q = q.MinimumNumberShouldMatch(1) q = q.MinimumNumberShouldMatch(1)
q = q.Should(elastic.NewBoolQuery().MustNot(elastic.NewExistsQuery("signature_digest"))) q = q.Should(elastic.NewBoolQuery().MustNot(elastic.NewExistsQuery("signature_digest")))
q = q.Should(elastic.NewTermQuery("signature_valid", in.SignatureValid.Value)) q = q.Should(elastic.NewTermQuery("is_signature_valid", in.SignatureValid.Value))
} }
if in.HasSource != nil { if in.HasSource != nil {