Revision 56829
Added by Claudio Atzori over 4 years ago
modules/cnr-mongo-mdstore/trunk/src/main/java/eu/dnetlib/data/mdstore/modular/mongodb/MongoResultSetListener.java | ||
---|---|---|
95 | 95 |
|
96 | 96 |
private Bson dateQuery(final Long from, final Long until) { |
97 | 97 |
if (from != null & until != null) { |
98 |
return and(gt("timestamp", from), lt("timestamp", until));
|
|
98 |
return and(gte("timestamp", from), lte("timestamp", until));
|
|
99 | 99 |
} |
100 | 100 |
if (from != null) { |
101 |
return gt("timestamp", from); |
|
101 |
return gte("timestamp", from);
|
|
102 | 102 |
} |
103 | 103 |
if (until != null) { |
104 |
return lt("timestamp", until); |
|
104 |
return lte("timestamp", until);
|
|
105 | 105 |
} |
106 | 106 |
return null; |
107 | 107 |
} |
Also available in: Unified diff
include also the lower and upper bounds in the queries