diff --git a/src/AElf.EntityMapping.Elasticsearch/Linq/GeneratorExpressionTreeVisitor.cs b/src/AElf.EntityMapping.Elasticsearch/Linq/GeneratorExpressionTreeVisitor.cs index d3d1c33..9c71ce6 100644 --- a/src/AElf.EntityMapping.Elasticsearch/Linq/GeneratorExpressionTreeVisitor.cs +++ b/src/AElf.EntityMapping.Elasticsearch/Linq/GeneratorExpressionTreeVisitor.cs @@ -335,52 +335,27 @@ private Node GetDifferentTypesTermsQueryNode() { query = GetTermsNode(); } - else if (PropertyType == typeof(Guid?)) - { - query = GetTermsNode(); - } else if (PropertyType == typeof(int)) { query = GetTermsNode(); } - else if (PropertyType == typeof(int?)) - { - query = GetTermsNode(); - } else if (PropertyType == typeof(long)) { query = GetTermsNode(); } - else if (PropertyType == typeof(long?)) - { - query = GetTermsNode(); - } else if (PropertyType == typeof(double)) { query = GetTermsNode(); } - else if (PropertyType == typeof(double?)) - { - query = GetTermsNode(); - } else if (PropertyType == typeof(bool)) { query = GetTermsNode(); } - else if (PropertyType == typeof(bool?)) - { - query = GetTermsNode(); - } else if (PropertyType == typeof(DateTime)) { query = new TermsNode(PropertyName, ((IEnumerable)Value).Select(x => x.ToString("o"))); } - else if (PropertyType == typeof(DateTime?)) - { - query = new TermsNode(PropertyName, - ((IEnumerable)Value).Select(x => x.ToString("o"))); - } else if (PropertyType == typeof(string)) { query = new TermsNode(PropertyName, (IEnumerable)Value);