Commit 8535256c authored by redmitry@list.ru's avatar redmitry@list.ru

filter confidence: 'ultimate' by default

parent a928243f
......@@ -149,6 +149,7 @@ public class MongoQueries {
* @param name text to search in the 'name' property.
* @param homepage text to search in the 'homepage' property.
* @param description text to search in the 'description' property.
* @param confidence the list of confidence levels to match (default 'ultimate')
* @param tags text to match the 'tags' property.
* @param projections - properties to write or null for all.
*/
......@@ -285,6 +286,8 @@ public class MongoQueries {
if (confidence != null && !confidence.isEmpty()) {
aggregation.add(Aggregates.match(Filters.in("confidence", confidence)));
} else {
aggregation.add(Aggregates.match(Filters.eq("confidence", "ultimate")));
}
if (tags != null && !tags.isEmpty()) {
......@@ -378,6 +381,8 @@ public class MongoQueries {
if (confidence != null && !confidence.isEmpty()) {
aggregation.add(Aggregates.match(Filters.in("confidence", confidence)));
} else {
aggregation.add(Aggregates.match(Filters.eq("confidence", "ultimate")));
}
if (tags != null && !tags.isEmpty()) {
......
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