You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by dg...@apache.org on 2018/07/05 14:13:46 UTC
[1/7] incubator-unomi git commit: UNOMI-185 create an additional
endpoint to execute aggregate query,
the new endpoint return a bit less information but is much faster
Repository: incubator-unomi
Updated Branches:
refs/heads/master ea1b788ec -> 8f44f4be6
UNOMI-185 create an additional endpoint to execute aggregate query, the new endpoint return a bit less information but is much faster
Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/7129cdb3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/7129cdb3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/7129cdb3
Branch: refs/heads/master
Commit: 7129cdb35e1624de3fa2e29eb2f7f2c19ee3f1ec
Parents: af7bfb1
Author: dgaillard <dg...@jahia.com>
Authored: Tue Jun 26 16:36:09 2018 +0200
Committer: dgaillard <dg...@jahia.com>
Committed: Fri Jun 29 10:31:36 2018 +0200
----------------------------------------------------------------------
.../apache/unomi/api/services/QueryService.java | 14 +++++
.../ElasticSearchPersistenceServiceImpl.java | 64 ++++++++++++++------
.../persistence/spi/PersistenceService.java | 13 ++++
.../BooleanConditionESQueryBuilder.java | 12 +++-
.../apache/unomi/rest/QueryServiceEndPoint.java | 19 ++++++
.../services/services/QueryServiceImpl.java | 61 ++++++++++++-------
6 files changed, 140 insertions(+), 43 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/7129cdb3/api/src/main/java/org/apache/unomi/api/services/QueryService.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/unomi/api/services/QueryService.java b/api/src/main/java/org/apache/unomi/api/services/QueryService.java
index 2465e65..3f3cb7b 100644
--- a/api/src/main/java/org/apache/unomi/api/services/QueryService.java
+++ b/api/src/main/java/org/apache/unomi/api/services/QueryService.java
@@ -44,6 +44,7 @@ public interface QueryService {
*
* Retrieves the number of items with the specified type as defined by the Item subclass public field {@code ITEM_TYPE} and aggregated by possible values of the specified
* property or, if the specified query is not {@code null}, perform that aggregate query.
+ * Also return the global count of document matching the {@code ITEM_TYPE}
*
* @param itemType the String representation of the item type we want to retrieve the count of, as defined by its class' {@code ITEM_TYPE} field
* @param property the property we're aggregating on, i.e. for each possible value of this property, we are counting how many items of the specified type have that value
@@ -54,6 +55,19 @@ public interface QueryService {
Map<String, Long> getAggregate(String itemType, String property, AggregateQuery query);
/**
+ * Retrieves the number of items with the specified type as defined by the Item subclass public field {@code ITEM_TYPE} and aggregated by possible values of the specified
+ * property or, if the specified query is not {@code null}, perform that aggregate query.
+ * This aggregate won't return the global count and should therefore be much faster than {@link #getAggregate(String, String, AggregateQuery)}
+ *
+ * @param itemType the String representation of the item type we want to retrieve the count of, as defined by its class' {@code ITEM_TYPE} field
+ * @param property the property we're aggregating on, i.e. for each possible value of this property, we are counting how many items of the specified type have that value
+ * @param query the {@link AggregateQuery} specifying the aggregation that should be perfomed
+ * @return a Map associating a specific value of the property to the cardinality of items with that value
+ * @see Item Item for a discussion of {@code ITEM_TYPE}
+ */
+ Map<String, Long> getAggregateOptimized(String itemType, String property, AggregateQuery query);
+
+ /**
* Retrieves the number of items of the specified type as defined by the Item subclass public field {@code ITEM_TYPE} and matching the specified {@link Condition}.
*
* @param condition the condition the items must satisfy
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/7129cdb3/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java
----------------------------------------------------------------------
diff --git a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java
index d5fa185..c7ec8d0 100644
--- a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java
+++ b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java
@@ -1483,6 +1483,16 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
@Override
public Map<String, Long> aggregateQuery(final Condition filter, final BaseAggregate aggregate, final String itemType) {
+ return aggregateQuery(filter, aggregate, itemType, false);
+ }
+
+ @Override
+ public Map<String, Long> aggregateQueryOptimized(Condition filter, BaseAggregate aggregate, String itemType) {
+ return aggregateQuery(filter, aggregate, itemType, true);
+ }
+
+ private Map<String, Long> aggregateQuery(final Condition filter, final BaseAggregate aggregate, final String itemType, final boolean
+ optimized) {
return new InClassLoaderExecute<Map<String, Long>>(metricsService, this.getClass().getName() + ".aggregateQuery") {
@Override
@@ -1560,34 +1570,50 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
}
}
- if (filter != null) {
- AggregationBuilder filterAggregation = AggregationBuilders.filter("filter", conditionESQueryBuilderDispatcher.buildFilter(filter));
+ // If the request is optimized then we don't need a global aggregation which is very slow and we can put the query with a
+ // filter on range items in the query block so we don't retrieve all the document before filtering the whole
+ if (optimized) {
for (AggregationBuilder aggregationBuilder : lastAggregation) {
- filterAggregation.subAggregation(aggregationBuilder);
+ builder.addAggregation(aggregationBuilder);
}
- lastAggregation = Collections.singletonList(filterAggregation);
- }
+ if (filter != null) {
+ builder.setQuery(conditionESQueryBuilderDispatcher.buildFilter(filter));
+ }
+ } else {
+ if (filter != null) {
+ AggregationBuilder filterAggregation = AggregationBuilders.filter("filter", conditionESQueryBuilderDispatcher.buildFilter(filter));
+ for (AggregationBuilder aggregationBuilder : lastAggregation) {
+ filterAggregation.subAggregation(aggregationBuilder);
+ }
+ lastAggregation = Collections.singletonList(filterAggregation);
+ }
- AggregationBuilder globalAggregation = AggregationBuilders.global("global");
- for (AggregationBuilder aggregationBuilder : lastAggregation) {
- globalAggregation.subAggregation(aggregationBuilder);
- }
+ AggregationBuilder globalAggregation = AggregationBuilders.global("global");
+ for (AggregationBuilder aggregationBuilder : lastAggregation) {
+ globalAggregation.subAggregation(aggregationBuilder);
+ }
- builder.addAggregation(globalAggregation);
+ builder.addAggregation(globalAggregation);
+ }
SearchResponse response = builder.execute().actionGet();
-
Aggregations aggregations = response.getAggregations();
if (aggregations != null) {
- Global globalAgg = aggregations.get("global");
- results.put("_all", globalAgg.getDocCount());
- aggregations = globalAgg.getAggregations();
-
- if (aggregations.get("filter") != null) {
- Filter filterAgg = aggregations.get("filter");
- results.put("_filtered", filterAgg.getDocCount());
- aggregations = filterAgg.getAggregations();
+ if (optimized) {
+ if (response.getHits() != null) {
+ results.put("_filtered", response.getHits().getTotalHits());
+ }
+ } else {
+ Global globalAgg = aggregations.get("global");
+ results.put("_all", globalAgg.getDocCount());
+ aggregations = globalAgg.getAggregations();
+
+ if (aggregations.get("filter") != null) {
+ Filter filterAgg = aggregations.get("filter");
+ results.put("_filtered", filterAgg.getDocCount());
+ aggregations = filterAgg.getAggregations();
+ }
}
if (aggregations.get("buckets") != null) {
MultiBucketsAggregation terms = aggregations.get("buckets");
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/7129cdb3/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PersistenceService.java
----------------------------------------------------------------------
diff --git a/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PersistenceService.java b/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PersistenceService.java
index b38531b..c98eb17 100644
--- a/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PersistenceService.java
+++ b/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PersistenceService.java
@@ -413,6 +413,7 @@ public interface PersistenceService {
/**
* Retrieves the number of items with the specified type as defined by the Item subclass public field {@code ITEM_TYPE} matching the optional specified condition and
* aggregated according to the specified {@link BaseAggregate}.
+ * Also return the global count of document matching the {@code ITEM_TYPE}
*
* @param filter the condition the items must match or {@code null} if no filtering is needed
* @param aggregate an aggregate specifying how matching items must be bundled
@@ -422,6 +423,18 @@ public interface PersistenceService {
Map<String, Long> aggregateQuery(Condition filter, BaseAggregate aggregate, String itemType);
/**
+ * Retrieves the number of items with the specified type as defined by the Item subclass public field {@code ITEM_TYPE} matching the optional specified condition and
+ * aggregated according to the specified {@link BaseAggregate}.
+ * This aggregate won't return the global count and should therefore be much faster than {@link #aggregateQuery(Condition, BaseAggregate, String)}
+ *
+ * @param filter the condition the items must match or {@code null} if no filtering is needed
+ * @param aggregate an aggregate specifying how matching items must be bundled
+ * @param itemType the String representation of the item type we want to retrieve the count of, as defined by its class' {@code ITEM_TYPE} field
+ * @return a Map associating aggregation dimension name as key and cardinality for that dimension as value
+ */
+ Map<String, Long> aggregateQueryOptimized(Condition filter, BaseAggregate aggregate, String itemType);
+
+ /**
* Updates the persistence's engine indices if needed.
*/
void refresh();
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/7129cdb3/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/BooleanConditionESQueryBuilder.java
----------------------------------------------------------------------
diff --git a/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/BooleanConditionESQueryBuilder.java b/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/BooleanConditionESQueryBuilder.java
index 7f85a1a..8a7a381 100644
--- a/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/BooleanConditionESQueryBuilder.java
+++ b/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/BooleanConditionESQueryBuilder.java
@@ -54,14 +54,22 @@ public class BooleanConditionESQueryBuilder implements ConditionESQueryBuilder {
if (isAndOperator) {
QueryBuilder andFilter = dispatcher.buildFilter(conditions.get(i), context);
if (andFilter != null) {
- boolQueryBuilder.must(andFilter);
+ if (andFilter.getName().equals("range")) {
+ boolQueryBuilder.filter(andFilter);
+ } else {
+ boolQueryBuilder.must(andFilter);
+ }
} else {
logger.warn("Null filter for boolean AND sub condition " + conditions.get(i));
}
} else {
QueryBuilder orFilter = dispatcher.buildFilter(conditions.get(i), context);
if (orFilter != null) {
- boolQueryBuilder.should(orFilter);
+ if (orFilter.getName().equals("range")) {
+ boolQueryBuilder.filter(orFilter);
+ } else {
+ boolQueryBuilder.should(orFilter);
+ }
} else {
logger.warn("Null filter for boolean OR sub condition " + conditions.get(i));
}
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/7129cdb3/rest/src/main/java/org/apache/unomi/rest/QueryServiceEndPoint.java
----------------------------------------------------------------------
diff --git a/rest/src/main/java/org/apache/unomi/rest/QueryServiceEndPoint.java b/rest/src/main/java/org/apache/unomi/rest/QueryServiceEndPoint.java
index 33c6bdb..3d68e05 100644
--- a/rest/src/main/java/org/apache/unomi/rest/QueryServiceEndPoint.java
+++ b/rest/src/main/java/org/apache/unomi/rest/QueryServiceEndPoint.java
@@ -82,6 +82,7 @@ public class QueryServiceEndPoint {
*
* Retrieves the number of items with the specified type as defined by the Item subclass public field {@code ITEM_TYPE} and aggregated by possible values of the specified
* property or, if the specified query is not {@code null}, perform that aggregate query.
+ * Also return the global count of document matching the {@code ITEM_TYPE}
*
* @param type the String representation of the item type we want to retrieve the count of, as defined by its class' {@code ITEM_TYPE} field
* @param property the property we're aggregating on, i.e. for each possible value of this property, we are counting how many items of the specified type have that value
@@ -96,6 +97,24 @@ public class QueryServiceEndPoint {
}
/**
+ * Retrieves the number of items with the specified type as defined by the Item subclass public field {@code ITEM_TYPE} and aggregated by possible values of the specified
+ * property or, if the specified query is not {@code null}, perform that aggregate query.
+ * This aggregate won't return the global count and should therefore be much faster than {@link #getAggregate(String, String, AggregateQuery)}
+ *
+ * @param type the String representation of the item type we want to retrieve the count of, as defined by its class' {@code ITEM_TYPE} field
+ * @param property the property we're aggregating on, i.e. for each possible value of this property, we are counting how many items of the specified type have that value
+ * @param aggregateQuery the {@link AggregateQuery} specifying the aggregation that should be perfomed
+ * @return a Map associating a specific value of the property to the cardinality of items with that value
+ * @see Item Item for a discussion of {@code ITEM_TYPE}
+ */
+ @POST
+ @Path("/{type}/{property}/optimized")
+ public Map<String, Long> getAggregateOptimized(@PathParam("type") String type, @PathParam("property") String property, AggregateQuery
+ aggregateQuery) {
+ return queryService.getAggregateOptimized(type, property, aggregateQuery);
+ }
+
+ /**
* Retrieves the specified metrics for the specified field of items of the specified type as defined by the Item subclass public field {@code ITEM_TYPE} and matching the
* specified {@link Condition}.
*
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/7129cdb3/services/src/main/java/org/apache/unomi/services/services/QueryServiceImpl.java
----------------------------------------------------------------------
diff --git a/services/src/main/java/org/apache/unomi/services/services/QueryServiceImpl.java b/services/src/main/java/org/apache/unomi/services/services/QueryServiceImpl.java
index bb9de1d..5da7076 100644
--- a/services/src/main/java/org/apache/unomi/services/services/QueryServiceImpl.java
+++ b/services/src/main/java/org/apache/unomi/services/services/QueryServiceImpl.java
@@ -58,6 +58,31 @@ public class QueryServiceImpl implements QueryService {
@Override
public Map<String, Long> getAggregate(String itemType, String property, AggregateQuery query) {
+ return getAggregate(itemType, property, query, false);
+ }
+
+ @Override
+ public Map<String, Long> getAggregateOptimized(String itemType, String property, AggregateQuery query) {
+ return getAggregate(itemType, property, query, true);
+ }
+
+ @Override
+ public Map<String, Double> getMetric(String type, String property, String slashConcatenatedMetrics, Condition condition) {
+ if (condition.getConditionType() == null) {
+ ParserHelper.resolveConditionType(definitionsService, condition);
+ }
+ return persistenceService.getSingleValuesMetrics(condition, slashConcatenatedMetrics.split("/"), property, type);
+ }
+
+ @Override
+ public long getQueryCount(String itemType, Condition condition) {
+ if (condition.getConditionType() == null) {
+ ParserHelper.resolveConditionType(definitionsService, condition);
+ }
+ return persistenceService.queryCount(condition, itemType);
+ }
+
+ private Map<String, Long> getAggregate(String itemType, String property, AggregateQuery query, boolean optimized) {
if (query != null) {
// resolve condition
if (query.getCondition() != null) {
@@ -65,6 +90,7 @@ public class QueryServiceImpl implements QueryService {
}
// resolve aggregate
+ BaseAggregate baseAggregate = null;
if (query.getAggregate() != null) {
String aggregateType = query.getAggregate().getType();
if (aggregateType != null) {
@@ -72,40 +98,31 @@ public class QueryServiceImpl implements QueryService {
if (aggregateType.equals("date")) {
String interval = (String) query.getAggregate().getParameters().get("interval");
String format = (String) query.getAggregate().getParameters().get("format");
- return persistenceService.aggregateQuery(query.getCondition(), new DateAggregate(property, interval, format), itemType);
+ baseAggregate = new DateAggregate(property, interval, format);
} else if (aggregateType.equals("dateRange") && query.getAggregate().getDateRanges() != null && query.getAggregate().getDateRanges().size() > 0) {
String format = (String) query.getAggregate().getParameters().get("format");
- return persistenceService.aggregateQuery(query.getCondition(), new DateRangeAggregate(query.getAggregate().getProperty(), format, query.getAggregate().getDateRanges()), itemType);
+ baseAggregate = new DateRangeAggregate(query.getAggregate().getProperty(), format, query.getAggregate().getDateRanges());
} else if (aggregateType.equals("numericRange") && query.getAggregate().getNumericRanges() != null && query.getAggregate().getNumericRanges().size() > 0) {
- return persistenceService.aggregateQuery(query.getCondition(), new NumericRangeAggregate(query.getAggregate().getProperty(), query.getAggregate().getNumericRanges()), itemType);
+ baseAggregate = new NumericRangeAggregate(query.getAggregate().getProperty(), query.getAggregate().getNumericRanges());
} else if (aggregateType.equals("ipRange") && query.getAggregate().ipRanges() != null && query.getAggregate().ipRanges().size() > 0) {
- return persistenceService.aggregateQuery(query.getCondition(), new IpRangeAggregate(query.getAggregate().getProperty(), query.getAggregate().ipRanges()), itemType);
+ baseAggregate = new IpRangeAggregate(query.getAggregate().getProperty(), query.getAggregate().ipRanges());
}
}
}
+ if (baseAggregate == null) {
+ baseAggregate = new TermsAggregate(property);
+ }
+
// fall back on terms aggregate
- return persistenceService.aggregateQuery(query.getCondition(), new TermsAggregate(property), itemType);
+ if (optimized) {
+ return persistenceService.aggregateQueryOptimized(query.getCondition(), baseAggregate, itemType);
+ } else {
+ return persistenceService.aggregateQuery(query.getCondition(), baseAggregate, itemType);
+ }
}
return getAggregate(itemType, property);
}
- @Override
- public Map<String, Double> getMetric(String type, String property, String slashConcatenatedMetrics, Condition condition) {
- if (condition.getConditionType() == null) {
- ParserHelper.resolveConditionType(definitionsService, condition);
- }
- return persistenceService.getSingleValuesMetrics(condition, slashConcatenatedMetrics.split("/"), property, type);
- }
-
- @Override
- public long getQueryCount(String itemType, Condition condition) {
- if (condition.getConditionType() == null) {
- ParserHelper.resolveConditionType(definitionsService, condition);
- }
- return persistenceService.queryCount(condition, itemType);
- }
-
-
}
\ No newline at end of file
[7/7] incubator-unomi git commit: Merge branch 'unomi-1.3.x'
Posted by dg...@apache.org.
Merge branch 'unomi-1.3.x'
Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/8f44f4be
Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/8f44f4be
Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/8f44f4be
Branch: refs/heads/master
Commit: 8f44f4be65e875668dfbbef6459df040d050c9a9
Parents: ea1b788 d9e9a8f
Author: dgaillard <dg...@jahia.com>
Authored: Thu Jul 5 16:13:07 2018 +0200
Committer: dgaillard <dg...@jahia.com>
Committed: Thu Jul 5 16:13:07 2018 +0200
----------------------------------------------------------------------
.../java/org/apache/unomi/api/Parameter.java | 3 +
.../unomi/api/services/DefinitionsService.java | 1 +
.../api/services/PersonalizationService.java | 3 +-
.../unomi/api/services/PrivacyService.java | 11 +--
.../apache/unomi/api/services/QueryService.java | 16 +++++
.../privacy/internal/PrivacyServiceImpl.java | 2 +-
.../ElasticSearchPersistenceServiceImpl.java | 70 ++++++++++++++------
.../persistence/spi/PersistenceService.java | 15 +++++
.../BooleanConditionESQueryBuilder.java | 12 +++-
.../PastEventConditionESQueryBuilder.java | 2 +-
.../apache/unomi/rest/QueryServiceEndPoint.java | 14 +++-
.../apache/unomi/rest/RulesServiceEndPoint.java | 3 +-
.../unomi/rest/ScoringServiceEndPoint.java | 5 +-
.../unomi/rest/SegmentServiceEndPoint.java | 3 +-
.../services/DefinitionsServiceImpl.java | 4 ++
.../services/services/EventServiceImpl.java | 2 +-
.../services/services/GoalsServiceImpl.java | 4 +-
.../services/services/QueryServiceImpl.java | 67 ++++++++++++-------
.../services/services/SegmentServiceImpl.java | 2 +-
.../versions/1.1/building-and-deploying.md | 4 +-
src/site/markdown/versions/1.1/concepts.md | 2 +-
.../markdown/versions/1.1/getting-started.md | 2 +-
.../versions/1.2/building-and-deploying.md | 4 +-
.../versions/master/building-and-deploying.md | 4 +-
src/site/markdown/versions/master/concepts.md | 3 +-
.../markdown/versions/master/twitter-sample.md | 2 +-
26 files changed, 186 insertions(+), 74 deletions(-)
----------------------------------------------------------------------
[4/7] incubator-unomi git commit: UNOMI-186 clean @Deprecated
documentation, add version of deprecation, add missing tag
Posted by dg...@apache.org.
UNOMI-186 clean @Deprecated documentation, add version of deprecation, add missing tag
Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/c0662043
Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/c0662043
Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/c0662043
Branch: refs/heads/master
Commit: c06620437bd67eaa16434641cdb0d512300fa5c9
Parents: b712694
Author: dgaillard <dg...@jahia.com>
Authored: Fri Jun 29 11:17:42 2018 +0200
Committer: dgaillard <dg...@jahia.com>
Committed: Fri Jun 29 11:17:42 2018 +0200
----------------------------------------------------------------------
api/src/main/java/org/apache/unomi/api/Parameter.java | 2 +-
.../org/apache/unomi/api/services/DefinitionsService.java | 1 +
.../apache/unomi/api/services/PersonalizationService.java | 2 +-
.../java/org/apache/unomi/api/services/PrivacyService.java | 8 ++++----
.../java/org/apache/unomi/api/services/QueryService.java | 1 +
.../elasticsearch/ElasticSearchPersistenceServiceImpl.java | 1 +
.../org/apache/unomi/persistence/spi/PersistenceService.java | 1 +
.../java/org/apache/unomi/rest/RulesServiceEndPoint.java | 2 +-
.../java/org/apache/unomi/rest/ScoringServiceEndPoint.java | 2 +-
.../java/org/apache/unomi/rest/SegmentServiceEndPoint.java | 2 +-
.../unomi/services/services/DefinitionsServiceImpl.java | 2 +-
.../org/apache/unomi/services/services/QueryServiceImpl.java | 3 ++-
12 files changed, 16 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c0662043/api/src/main/java/org/apache/unomi/api/Parameter.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/unomi/api/Parameter.java b/api/src/main/java/org/apache/unomi/api/Parameter.java
index c4d7d99..c8a1f9e 100644
--- a/api/src/main/java/org/apache/unomi/api/Parameter.java
+++ b/api/src/main/java/org/apache/unomi/api/Parameter.java
@@ -47,7 +47,7 @@ public class Parameter implements Serializable {
return multivalued;
}
- @Deprecated
+ @Deprecated // As of version 1.1.0-incubating
public void setChoiceListInitializerFilter(String choiceListInitializerFilter) {
// Avoid errors when deploying old definitions
}
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c0662043/api/src/main/java/org/apache/unomi/api/services/DefinitionsService.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/unomi/api/services/DefinitionsService.java b/api/src/main/java/org/apache/unomi/api/services/DefinitionsService.java
index 4b1a141..25ec40b 100644
--- a/api/src/main/java/org/apache/unomi/api/services/DefinitionsService.java
+++ b/api/src/main/java/org/apache/unomi/api/services/DefinitionsService.java
@@ -181,6 +181,7 @@ public interface DefinitionsService {
* @param rootCondition the root condition where to start the extraction by class
* @param tag the tag to use to extract the condition
* @return Condition the condition that has been found matching the tag, or null if none matched
+ * @deprecated As of 1.2.0-incubating, please use {@link #extractConditionBySystemTag(Condition, String)} instead
*/
@Deprecated
Condition extractConditionByTag(Condition rootCondition, String tag);
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c0662043/api/src/main/java/org/apache/unomi/api/services/PersonalizationService.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/unomi/api/services/PersonalizationService.java b/api/src/main/java/org/apache/unomi/api/services/PersonalizationService.java
index 5cff730..d8df08c 100644
--- a/api/src/main/java/org/apache/unomi/api/services/PersonalizationService.java
+++ b/api/src/main/java/org/apache/unomi/api/services/PersonalizationService.java
@@ -131,7 +131,7 @@ public interface PersonalizationService {
* Sets the filter identifier associated with this content filtering definition.
*
* @param filterid the filter identifier associated with this content filtering definition
- * @deprecated this method is deprecated use the setId method instead
+ * @deprecated As of version 1.3.0-incubating, please use {@link #setId(String)} instead
*/
public void setFilterid(String filterid) {
this.id = filterid;
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c0662043/api/src/main/java/org/apache/unomi/api/services/PrivacyService.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/unomi/api/services/PrivacyService.java b/api/src/main/java/org/apache/unomi/api/services/PrivacyService.java
index 4dc7def..4b67caf 100644
--- a/api/src/main/java/org/apache/unomi/api/services/PrivacyService.java
+++ b/api/src/main/java/org/apache/unomi/api/services/PrivacyService.java
@@ -146,14 +146,14 @@ public interface PrivacyService {
* @param profileId the profile for which to see the denied properties
* @param propertyNames the property names to be denied
* @return null all the time, this method is not used and is marked as deprecated
- * @deprecated don't use this method, instead mark properties with the personal identifier tag which will mark them
- * as denied by the getDeniedProperties method
+ * @deprecated As of version 1.3.0-incubating, do not use this method, instead mark properties with the personal identifier tag which
+ * will mark them as denied by the getDeniedProperties method
*/
Boolean setDeniedProperties(String profileId, List<String> propertyNames);
/**
* This method doesn't do anything anymore please don't use it
- * @deprecated do not use
+ * @deprecated As of version 1.3.0-incubating, do not use this method
* @param profileId the identifier of the profile
* @return do not use
*/
@@ -161,7 +161,7 @@ public interface PrivacyService {
/**
* This method doesn't do anything anymore please don't use it
- * @deprecated do not use
+ * @deprecated As of version 1.3.0-incubating, do not use this method
* @param profileId the identifier of the profile
* @param propertyNames do not use
* @return do not use
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c0662043/api/src/main/java/org/apache/unomi/api/services/QueryService.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/unomi/api/services/QueryService.java b/api/src/main/java/org/apache/unomi/api/services/QueryService.java
index 6ff5cc3..208277b 100644
--- a/api/src/main/java/org/apache/unomi/api/services/QueryService.java
+++ b/api/src/main/java/org/apache/unomi/api/services/QueryService.java
@@ -51,6 +51,7 @@ public interface QueryService {
* @param query the {@link AggregateQuery} specifying the aggregation that should be perfomed
* @return a Map associating a specific value of the property to the cardinality of items with that value
* @see Item Item for a discussion of {@code ITEM_TYPE}
+ * @deprecated As of 1.3.0-incubating, please use {@link #getAggregateWithOptimizedQuery(String, String, AggregateQuery)} instead
*/
Map<String, Long> getAggregate(String itemType, String property, AggregateQuery query);
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c0662043/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java
----------------------------------------------------------------------
diff --git a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java
index 0f527db..e63f928 100644
--- a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java
+++ b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java
@@ -1481,6 +1481,7 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
}.catchingExecuteInClassLoader(true);
}
+ @Deprecated // As of version 1.3.0-incubating
@Override
public Map<String, Long> aggregateQuery(Condition filter, BaseAggregate aggregate, String itemType) {
return aggregateQuery(filter, aggregate, itemType, false);
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c0662043/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PersistenceService.java
----------------------------------------------------------------------
diff --git a/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PersistenceService.java b/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PersistenceService.java
index ec22654..1b673be 100644
--- a/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PersistenceService.java
+++ b/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PersistenceService.java
@@ -419,6 +419,7 @@ public interface PersistenceService {
* @param aggregate an aggregate specifying how matching items must be bundled
* @param itemType the String representation of the item type we want to retrieve the count of, as defined by its class' {@code ITEM_TYPE} field
* @return a Map associating aggregation dimension name as key and cardinality for that dimension as value
+ * @deprecated As of 1.3.0-incubating, please use {@link #aggregateWithOptimizedQuery(Condition, BaseAggregate, String)} instead
*/
Map<String, Long> aggregateQuery(Condition filter, BaseAggregate aggregate, String itemType);
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c0662043/rest/src/main/java/org/apache/unomi/rest/RulesServiceEndPoint.java
----------------------------------------------------------------------
diff --git a/rest/src/main/java/org/apache/unomi/rest/RulesServiceEndPoint.java b/rest/src/main/java/org/apache/unomi/rest/RulesServiceEndPoint.java
index 8ed3bbe..1e7e37c 100644
--- a/rest/src/main/java/org/apache/unomi/rest/RulesServiceEndPoint.java
+++ b/rest/src/main/java/org/apache/unomi/rest/RulesServiceEndPoint.java
@@ -163,7 +163,7 @@ public class RulesServiceEndPoint {
/**
* TODO: remove
*
- * @deprecated not needed anymore
+ * @deprecated As of version 1.1.0-incubating, not needed anymore
*/
@GET
@Path("/resetQueries")
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c0662043/rest/src/main/java/org/apache/unomi/rest/ScoringServiceEndPoint.java
----------------------------------------------------------------------
diff --git a/rest/src/main/java/org/apache/unomi/rest/ScoringServiceEndPoint.java b/rest/src/main/java/org/apache/unomi/rest/ScoringServiceEndPoint.java
index bc60f9d..6001c97 100644
--- a/rest/src/main/java/org/apache/unomi/rest/ScoringServiceEndPoint.java
+++ b/rest/src/main/java/org/apache/unomi/rest/ScoringServiceEndPoint.java
@@ -153,7 +153,7 @@ public class ScoringServiceEndPoint {
/**
* TODO: remove
*
- * @deprecated not needed anymore
+ * @deprecated As of version 1.1.0-incubating, not needed anymore
*/
@GET
@Path("/resetQueries")
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c0662043/rest/src/main/java/org/apache/unomi/rest/SegmentServiceEndPoint.java
----------------------------------------------------------------------
diff --git a/rest/src/main/java/org/apache/unomi/rest/SegmentServiceEndPoint.java b/rest/src/main/java/org/apache/unomi/rest/SegmentServiceEndPoint.java
index 169a946..33da462 100644
--- a/rest/src/main/java/org/apache/unomi/rest/SegmentServiceEndPoint.java
+++ b/rest/src/main/java/org/apache/unomi/rest/SegmentServiceEndPoint.java
@@ -181,7 +181,7 @@ public class SegmentServiceEndPoint {
/**
* TODO: remove
*
- * @deprecated not needed anymore
+ * @deprecated As of version 1.1.0-incubating, not needed anymore
*/
@GET
@Path("/resetQueries")
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c0662043/services/src/main/java/org/apache/unomi/services/services/DefinitionsServiceImpl.java
----------------------------------------------------------------------
diff --git a/services/src/main/java/org/apache/unomi/services/services/DefinitionsServiceImpl.java b/services/src/main/java/org/apache/unomi/services/services/DefinitionsServiceImpl.java
index 3392522..62be8bb 100644
--- a/services/src/main/java/org/apache/unomi/services/services/DefinitionsServiceImpl.java
+++ b/services/src/main/java/org/apache/unomi/services/services/DefinitionsServiceImpl.java
@@ -379,7 +379,7 @@ public class DefinitionsServiceImpl implements DefinitionsService, SynchronousBu
}
}
- @Deprecated
+ @Deprecated // As of version 1.2.0-incubating
public Condition extractConditionByTag(Condition rootCondition, String tag) {
if (rootCondition.containsParameter("subConditions")) {
@SuppressWarnings("unchecked")
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c0662043/services/src/main/java/org/apache/unomi/services/services/QueryServiceImpl.java
----------------------------------------------------------------------
diff --git a/services/src/main/java/org/apache/unomi/services/services/QueryServiceImpl.java b/services/src/main/java/org/apache/unomi/services/services/QueryServiceImpl.java
index bdbc9d1..d5aa81a 100644
--- a/services/src/main/java/org/apache/unomi/services/services/QueryServiceImpl.java
+++ b/services/src/main/java/org/apache/unomi/services/services/QueryServiceImpl.java
@@ -53,9 +53,10 @@ public class QueryServiceImpl implements QueryService {
@Override
public Map<String, Long> getAggregate(String itemType, String property) {
- return persistenceService.aggregateQuery(null, new TermsAggregate(property), itemType);
+ return persistenceService.aggregateWithOptimizedQuery(null, new TermsAggregate(property), itemType);
}
+ @Deprecated // As of version 1.3.0-incubating
@Override
public Map<String, Long> getAggregate(String itemType, String property, AggregateQuery query) {
return getAggregate(itemType, property, query, false);
[3/7] incubator-unomi git commit: UNOMI-185 use the optimized
aggregation when possible
Posted by dg...@apache.org.
UNOMI-185 use the optimized aggregation when possible
Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/b7126940
Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/b7126940
Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/b7126940
Branch: refs/heads/master
Commit: b712694083ae34cf175958043388f709143a2741
Parents: f579e14
Author: dgaillard <dg...@jahia.com>
Authored: Wed Jun 27 18:47:12 2018 +0200
Committer: dgaillard <dg...@jahia.com>
Committed: Fri Jun 29 10:32:28 2018 +0200
----------------------------------------------------------------------
.../org/apache/unomi/privacy/internal/PrivacyServiceImpl.java | 2 +-
.../baseplugin/conditions/PastEventConditionESQueryBuilder.java | 2 +-
.../org/apache/unomi/services/services/EventServiceImpl.java | 2 +-
.../org/apache/unomi/services/services/GoalsServiceImpl.java | 4 ++--
.../org/apache/unomi/services/services/SegmentServiceImpl.java | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b7126940/extensions/privacy-extension/services/src/main/java/org/apache/unomi/privacy/internal/PrivacyServiceImpl.java
----------------------------------------------------------------------
diff --git a/extensions/privacy-extension/services/src/main/java/org/apache/unomi/privacy/internal/PrivacyServiceImpl.java b/extensions/privacy-extension/services/src/main/java/org/apache/unomi/privacy/internal/PrivacyServiceImpl.java
index d4aad1f..247a7f4 100644
--- a/extensions/privacy-extension/services/src/main/java/org/apache/unomi/privacy/internal/PrivacyServiceImpl.java
+++ b/extensions/privacy-extension/services/src/main/java/org/apache/unomi/privacy/internal/PrivacyServiceImpl.java
@@ -68,7 +68,7 @@ public class PrivacyServiceImpl implements PrivacyService {
serverInfo.setServerVersion(bundleContext.getBundle().getVersion().toString());
// let's retrieve all the event types the server has seen.
- Map<String, Long> eventTypeCounts = persistenceService.aggregateQuery(null, new TermsAggregate("eventType"), Event.ITEM_TYPE);
+ Map<String, Long> eventTypeCounts = persistenceService.aggregateWithOptimizedQuery(null, new TermsAggregate("eventType"), Event.ITEM_TYPE);
List<EventInfo> eventTypes = new ArrayList<EventInfo>();
for (Map.Entry<String, Long> eventTypeEntry : eventTypeCounts.entrySet()) {
EventInfo eventInfo = new EventInfo();
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b7126940/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/PastEventConditionESQueryBuilder.java
----------------------------------------------------------------------
diff --git a/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/PastEventConditionESQueryBuilder.java b/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/PastEventConditionESQueryBuilder.java
index 7c6217b..e51aaa8 100644
--- a/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/PastEventConditionESQueryBuilder.java
+++ b/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/PastEventConditionESQueryBuilder.java
@@ -75,7 +75,7 @@ public class PastEventConditionESQueryBuilder implements ConditionESQueryBuilder
Integer minimumEventCount = condition.getParameter("minimumEventCount") == null ? 0 : (Integer) condition.getParameter("minimumEventCount");
Integer maximumEventCount = condition.getParameter("maximumEventCount") == null ? Integer.MAX_VALUE : (Integer) condition.getParameter("maximumEventCount");
- Map<String, Long> eventCountByProfile = persistenceService.aggregateQuery(andCondition, new TermsAggregate("profileId"), Event.ITEM_TYPE);
+ Map<String, Long> eventCountByProfile = persistenceService.aggregateWithOptimizedQuery(andCondition, new TermsAggregate("profileId"), Event.ITEM_TYPE);
if (eventCountByProfile != null) {
for (Map.Entry<String, Long> entry : eventCountByProfile.entrySet()) {
if (!entry.getKey().startsWith("_")) {
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b7126940/services/src/main/java/org/apache/unomi/services/services/EventServiceImpl.java
----------------------------------------------------------------------
diff --git a/services/src/main/java/org/apache/unomi/services/services/EventServiceImpl.java b/services/src/main/java/org/apache/unomi/services/services/EventServiceImpl.java
index 54b85e4..5e1ed66 100644
--- a/services/src/main/java/org/apache/unomi/services/services/EventServiceImpl.java
+++ b/services/src/main/java/org/apache/unomi/services/services/EventServiceImpl.java
@@ -195,7 +195,7 @@ public class EventServiceImpl implements EventService {
}
public Set<String> getEventTypeIds() {
- Map<String, Long> dynamicEventTypeIds = persistenceService.aggregateQuery(null, new TermsAggregate("eventType"), Event.ITEM_TYPE);
+ Map<String, Long> dynamicEventTypeIds = persistenceService.aggregateWithOptimizedQuery(null, new TermsAggregate("eventType"), Event.ITEM_TYPE);
Set<String> eventTypeIds = new LinkedHashSet<String>(predefinedEventTypeIds);
eventTypeIds.addAll(dynamicEventTypeIds.keySet());
return eventTypeIds;
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b7126940/services/src/main/java/org/apache/unomi/services/services/GoalsServiceImpl.java
----------------------------------------------------------------------
diff --git a/services/src/main/java/org/apache/unomi/services/services/GoalsServiceImpl.java b/services/src/main/java/org/apache/unomi/services/services/GoalsServiceImpl.java
index bd7fce5..771e21f 100644
--- a/services/src/main/java/org/apache/unomi/services/services/GoalsServiceImpl.java
+++ b/services/src/main/java/org/apache/unomi/services/services/GoalsServiceImpl.java
@@ -491,11 +491,11 @@ public class GoalsServiceImpl implements GoalsService, SynchronousBundleListener
if (aggregate != null) {
list.add(goalStartCondition);
- all = persistenceService.aggregateQuery(condition, aggregate, Session.ITEM_TYPE);
+ all = persistenceService.aggregateWithOptimizedQuery(condition, aggregate, Session.ITEM_TYPE);
list.remove(goalStartCondition);
list.add(goalTargetCondition);
- match = persistenceService.aggregateQuery(condition, aggregate, Session.ITEM_TYPE);
+ match = persistenceService.aggregateWithOptimizedQuery(condition, aggregate, Session.ITEM_TYPE);
} else {
list.add(goalStartCondition);
all = new HashMap<String, Long>();
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b7126940/services/src/main/java/org/apache/unomi/services/services/SegmentServiceImpl.java
----------------------------------------------------------------------
diff --git a/services/src/main/java/org/apache/unomi/services/services/SegmentServiceImpl.java b/services/src/main/java/org/apache/unomi/services/services/SegmentServiceImpl.java
index a3dc984..3d1067b 100644
--- a/services/src/main/java/org/apache/unomi/services/services/SegmentServiceImpl.java
+++ b/services/src/main/java/org/apache/unomi/services/services/SegmentServiceImpl.java
@@ -768,7 +768,7 @@ public class SegmentServiceImpl extends AbstractServiceImpl implements SegmentSe
l.add(numberOfDaysCondition);
}
String propertyKey = (String) parentCondition.getParameter("generatedPropertyKey");
- Map<String, Long> eventCountByProfile = persistenceService.aggregateQuery(andCondition, new TermsAggregate("profileId"), Event.ITEM_TYPE);
+ Map<String, Long> eventCountByProfile = persistenceService.aggregateWithOptimizedQuery(andCondition, new TermsAggregate("profileId"), Event.ITEM_TYPE);
for (Map.Entry<String, Long> entry : eventCountByProfile.entrySet()) {
String profileId = entry.getKey();
if (!profileId.startsWith("_")) {
[5/7] incubator-unomi git commit: UNOMI-186 clean markdown
documentation
Posted by dg...@apache.org.
UNOMI-186 clean markdown documentation
Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/d5d84504
Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/d5d84504
Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/d5d84504
Branch: refs/heads/master
Commit: d5d845046ac3e4778dd4e3805a4d9bff4d7bb19a
Parents: c066204
Author: dgaillard <dg...@jahia.com>
Authored: Fri Jun 29 11:29:33 2018 +0200
Committer: dgaillard <dg...@jahia.com>
Committed: Fri Jun 29 11:29:33 2018 +0200
----------------------------------------------------------------------
src/site/markdown/versions/1.1/building-and-deploying.md | 4 ++--
src/site/markdown/versions/1.1/concepts.md | 2 +-
src/site/markdown/versions/1.1/getting-started.md | 2 +-
src/site/markdown/versions/1.2/building-and-deploying.md | 4 ++--
src/site/markdown/versions/master/building-and-deploying.md | 4 ++--
src/site/markdown/versions/master/concepts.md | 3 +--
src/site/markdown/versions/master/twitter-sample.md | 2 +-
7 files changed, 10 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d5d84504/src/site/markdown/versions/1.1/building-and-deploying.md
----------------------------------------------------------------------
diff --git a/src/site/markdown/versions/1.1/building-and-deploying.md b/src/site/markdown/versions/1.1/building-and-deploying.md
index 6b3c525..7d39902 100644
--- a/src/site/markdown/versions/1.1/building-and-deploying.md
+++ b/src/site/markdown/versions/1.1/building-and-deploying.md
@@ -38,11 +38,11 @@ Simply uncompress the `package/target/unomi-VERSION.tar.gz` (for Linux or Mac OS
You can then start the server simply by using the command on UNIX/Linux/MacOS X :
- ./bin/karaf start
+ ./bin/karaf
or on Windows shell :
- bin\karaf.bat start
+ bin\karaf.bat
Deploying into an existing Karaf server
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d5d84504/src/site/markdown/versions/1.1/concepts.md
----------------------------------------------------------------------
diff --git a/src/site/markdown/versions/1.1/concepts.md b/src/site/markdown/versions/1.1/concepts.md
index 79cb748..4f4e7be 100644
--- a/src/site/markdown/versions/1.1/concepts.md
+++ b/src/site/markdown/versions/1.1/concepts.md
@@ -51,7 +51,7 @@ Some types can be dynamically defined at runtime by calling to the REST API whil
"metadata": {
"id": "tweetNb",
"name": "tweetNb",
- "systemTags": ["social"]
+ "tags": ["social"]
},
"target": "profiles",
"type": "integer"
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d5d84504/src/site/markdown/versions/1.1/getting-started.md
----------------------------------------------------------------------
diff --git a/src/site/markdown/versions/1.1/getting-started.md b/src/site/markdown/versions/1.1/getting-started.md
index 6303c78..809a75b 100644
--- a/src/site/markdown/versions/1.1/getting-started.md
+++ b/src/site/markdown/versions/1.1/getting-started.md
@@ -322,7 +322,7 @@ Let's now look at our custom [`incrementTweetNumberAction`](https://github.com/a
{
"id": "incrementTweetNumberAction",
"actionExecutor": "incrementTweetNumber",
- "systemTags": [
+ "tags": [
"event"
],
"parameters": []
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d5d84504/src/site/markdown/versions/1.2/building-and-deploying.md
----------------------------------------------------------------------
diff --git a/src/site/markdown/versions/1.2/building-and-deploying.md b/src/site/markdown/versions/1.2/building-and-deploying.md
index f5a2fb2..253fd0b 100644
--- a/src/site/markdown/versions/1.2/building-and-deploying.md
+++ b/src/site/markdown/versions/1.2/building-and-deploying.md
@@ -86,11 +86,11 @@ Simply uncompress the package/target/unomi-VERSION.tar.gz (for Linux or Mac OS X
You can then start the server simply by using the command on UNIX/Linux/MacOS X :
- ./bin/karaf start
+ ./bin/karaf
or on Windows shell :
- bin\karaf.bat start
+ bin\karaf.bat
Deploying into an existing Karaf server
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d5d84504/src/site/markdown/versions/master/building-and-deploying.md
----------------------------------------------------------------------
diff --git a/src/site/markdown/versions/master/building-and-deploying.md b/src/site/markdown/versions/master/building-and-deploying.md
index a62bccd..042201b 100644
--- a/src/site/markdown/versions/master/building-and-deploying.md
+++ b/src/site/markdown/versions/master/building-and-deploying.md
@@ -86,11 +86,11 @@ Simply uncompress the package/target/unomi-VERSION.tar.gz (for Linux or Mac OS X
You can then start the server simply by using the command on UNIX/Linux/MacOS X :
- ./bin/karaf start
+ ./bin/karaf
or on Windows shell :
- bin\karaf.bat start
+ bin\karaf.bat
You will then need to launch (only on the first Karaf start) the Apache Unomi packages using the following Apache Karaf
shell command:
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d5d84504/src/site/markdown/versions/master/concepts.md
----------------------------------------------------------------------
diff --git a/src/site/markdown/versions/master/concepts.md b/src/site/markdown/versions/master/concepts.md
index 13fe485..cea56a3 100644
--- a/src/site/markdown/versions/master/concepts.md
+++ b/src/site/markdown/versions/master/concepts.md
@@ -142,7 +142,6 @@ Being built on top of Apache Karaf, Unomi leverages OSGi to support plugins. A U
| Rule | rules |
| Scoring | scorings |
| Segment | segments |
-| Tag | tags |
| ValueType | values |
[Blueprint](http://aries.apache.org/modules/blueprint.html) is used to declare what the plugin provides and inject any required dependency. The Blueprint file is located, as usual, at `OSGI-INF/blueprint/blueprint.xml` in the bundle JAR file.
@@ -176,7 +175,7 @@ A persona is a "virtual" profile used to represent categories of profiles, and m
A strategy to resolve how to merge properties when merging profile together.
### PropertyType
-Definition for a profile or session property, specifying how possible values are constrained, if the value is multi-valued (a vector of values as opposed to a scalar value). `PropertyType`s can also be categorized using tags or file system structure, using sub-directories to organize definition files.
+Definition for a profile or session property, specifying how possible values are constrained, if the value is multi-valued (a vector of values as opposed to a scalar value). `PropertyType`s can also be categorized using systemTags or file system structure, using sub-directories to organize definition files.
### Rule
`Rule`s are conditional sets of actions to be executed in response to incoming events. Triggering of rules is guarded by a condition: the rule is only triggered if the associated condition is satisfied. That condition can test the event itself, but also the profile or the session. Once a rule triggers, a list of actions can be performed as consequences. Also, when rules trigger, a specific event is raised so that other parts of Unomi can react accordingly.
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d5d84504/src/site/markdown/versions/master/twitter-sample.md
----------------------------------------------------------------------
diff --git a/src/site/markdown/versions/master/twitter-sample.md b/src/site/markdown/versions/master/twitter-sample.md
index 5d6c25c..d07b512 100644
--- a/src/site/markdown/versions/master/twitter-sample.md
+++ b/src/site/markdown/versions/master/twitter-sample.md
@@ -306,7 +306,7 @@ Let's now look at our custom [`incrementTweetNumberAction`](https://github.com/a
}
```
-We specify the identifier for the action type, a list of tags if needed: here we say that our action is a consequence of events using the `event` tag. Our actions does not require any parameters so we don't define any.
+We specify the identifier for the action type, a list of systemTags if needed: here we say that our action is a consequence of events using the `event` tag. Our actions does not require any parameters so we don't define any.
Finally, we provide a mysterious `actionExecutor` identifier: `incrementTweetNumber`.
[2/7] incubator-unomi git commit: UNOMI-185 refactor and clean code
after successful test with optimized query
Posted by dg...@apache.org.
UNOMI-185 refactor and clean code after successful test with optimized query
Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/f579e142
Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/f579e142
Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/f579e142
Branch: refs/heads/master
Commit: f579e1423c51bfb4a1b174a77ce3126ac2185867
Parents: 7129cdb
Author: dgaillard <dg...@jahia.com>
Authored: Wed Jun 27 12:01:56 2018 +0200
Committer: dgaillard <dg...@jahia.com>
Committed: Fri Jun 29 10:31:59 2018 +0200
----------------------------------------------------------------------
.../apache/unomi/api/services/QueryService.java | 2 +-
.../ElasticSearchPersistenceServiceImpl.java | 12 +++----
.../persistence/spi/PersistenceService.java | 2 +-
.../apache/unomi/rest/QueryServiceEndPoint.java | 33 +++++++-------------
.../services/services/QueryServiceImpl.java | 8 ++---
5 files changed, 23 insertions(+), 34 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/f579e142/api/src/main/java/org/apache/unomi/api/services/QueryService.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/unomi/api/services/QueryService.java b/api/src/main/java/org/apache/unomi/api/services/QueryService.java
index 3f3cb7b..6ff5cc3 100644
--- a/api/src/main/java/org/apache/unomi/api/services/QueryService.java
+++ b/api/src/main/java/org/apache/unomi/api/services/QueryService.java
@@ -65,7 +65,7 @@ public interface QueryService {
* @return a Map associating a specific value of the property to the cardinality of items with that value
* @see Item Item for a discussion of {@code ITEM_TYPE}
*/
- Map<String, Long> getAggregateOptimized(String itemType, String property, AggregateQuery query);
+ Map<String, Long> getAggregateWithOptimizedQuery(String itemType, String property, AggregateQuery query);
/**
* Retrieves the number of items of the specified type as defined by the Item subclass public field {@code ITEM_TYPE} and matching the specified {@link Condition}.
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/f579e142/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java
----------------------------------------------------------------------
diff --git a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java
index c7ec8d0..0f527db 100644
--- a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java
+++ b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java
@@ -1482,17 +1482,17 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
}
@Override
- public Map<String, Long> aggregateQuery(final Condition filter, final BaseAggregate aggregate, final String itemType) {
+ public Map<String, Long> aggregateQuery(Condition filter, BaseAggregate aggregate, String itemType) {
return aggregateQuery(filter, aggregate, itemType, false);
}
@Override
- public Map<String, Long> aggregateQueryOptimized(Condition filter, BaseAggregate aggregate, String itemType) {
+ public Map<String, Long> aggregateWithOptimizedQuery(Condition filter, BaseAggregate aggregate, String itemType) {
return aggregateQuery(filter, aggregate, itemType, true);
}
- private Map<String, Long> aggregateQuery(final Condition filter, final BaseAggregate aggregate, final String itemType, final boolean
- optimized) {
+ private Map<String, Long> aggregateQuery(final Condition filter, final BaseAggregate aggregate, final String itemType,
+ final boolean optimizedQuery) {
return new InClassLoaderExecute<Map<String, Long>>(metricsService, this.getClass().getName() + ".aggregateQuery") {
@Override
@@ -1572,7 +1572,7 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
// If the request is optimized then we don't need a global aggregation which is very slow and we can put the query with a
// filter on range items in the query block so we don't retrieve all the document before filtering the whole
- if (optimized) {
+ if (optimizedQuery) {
for (AggregationBuilder aggregationBuilder : lastAggregation) {
builder.addAggregation(aggregationBuilder);
}
@@ -1600,7 +1600,7 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
SearchResponse response = builder.execute().actionGet();
Aggregations aggregations = response.getAggregations();
if (aggregations != null) {
- if (optimized) {
+ if (optimizedQuery) {
if (response.getHits() != null) {
results.put("_filtered", response.getHits().getTotalHits());
}
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/f579e142/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PersistenceService.java
----------------------------------------------------------------------
diff --git a/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PersistenceService.java b/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PersistenceService.java
index c98eb17..ec22654 100644
--- a/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PersistenceService.java
+++ b/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PersistenceService.java
@@ -432,7 +432,7 @@ public interface PersistenceService {
* @param itemType the String representation of the item type we want to retrieve the count of, as defined by its class' {@code ITEM_TYPE} field
* @return a Map associating aggregation dimension name as key and cardinality for that dimension as value
*/
- Map<String, Long> aggregateQueryOptimized(Condition filter, BaseAggregate aggregate, String itemType);
+ Map<String, Long> aggregateWithOptimizedQuery(Condition filter, BaseAggregate aggregate, String itemType);
/**
* Updates the persistence's engine indices if needed.
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/f579e142/rest/src/main/java/org/apache/unomi/rest/QueryServiceEndPoint.java
----------------------------------------------------------------------
diff --git a/rest/src/main/java/org/apache/unomi/rest/QueryServiceEndPoint.java b/rest/src/main/java/org/apache/unomi/rest/QueryServiceEndPoint.java
index 3d68e05..25e2456 100644
--- a/rest/src/main/java/org/apache/unomi/rest/QueryServiceEndPoint.java
+++ b/rest/src/main/java/org/apache/unomi/rest/QueryServiceEndPoint.java
@@ -82,36 +82,25 @@ public class QueryServiceEndPoint {
*
* Retrieves the number of items with the specified type as defined by the Item subclass public field {@code ITEM_TYPE} and aggregated by possible values of the specified
* property or, if the specified query is not {@code null}, perform that aggregate query.
- * Also return the global count of document matching the {@code ITEM_TYPE}
+ * Also return the global count of document matching the {@code ITEM_TYPE} if you don't use {@code optimizedQuery} or set it to false,
+ * otherwise if {@code optimizedQuery} is set to true then it won't return the global count but the query will be executed much faster.
*
* @param type the String representation of the item type we want to retrieve the count of, as defined by its class' {@code ITEM_TYPE} field
* @param property the property we're aggregating on, i.e. for each possible value of this property, we are counting how many items of the specified type have that value
- * @param aggregateQuery the {@link AggregateQuery} specifying the aggregation that should be perfomed
+ * @param aggregateQuery the {@link AggregateQuery} specifying the aggregation that should be performed
+ * @param optimizedQuery the {@code optimizedQuery} specifying if we should optimized the aggregate query or not
* @return a Map associating a specific value of the property to the cardinality of items with that value
* @see Item Item for a discussion of {@code ITEM_TYPE}
*/
@POST
@Path("/{type}/{property}")
- public Map<String, Long> getAggregate(@PathParam("type") String type, @PathParam("property") String property, AggregateQuery aggregateQuery) {
- return queryService.getAggregate(type, property, aggregateQuery);
- }
-
- /**
- * Retrieves the number of items with the specified type as defined by the Item subclass public field {@code ITEM_TYPE} and aggregated by possible values of the specified
- * property or, if the specified query is not {@code null}, perform that aggregate query.
- * This aggregate won't return the global count and should therefore be much faster than {@link #getAggregate(String, String, AggregateQuery)}
- *
- * @param type the String representation of the item type we want to retrieve the count of, as defined by its class' {@code ITEM_TYPE} field
- * @param property the property we're aggregating on, i.e. for each possible value of this property, we are counting how many items of the specified type have that value
- * @param aggregateQuery the {@link AggregateQuery} specifying the aggregation that should be perfomed
- * @return a Map associating a specific value of the property to the cardinality of items with that value
- * @see Item Item for a discussion of {@code ITEM_TYPE}
- */
- @POST
- @Path("/{type}/{property}/optimized")
- public Map<String, Long> getAggregateOptimized(@PathParam("type") String type, @PathParam("property") String property, AggregateQuery
- aggregateQuery) {
- return queryService.getAggregateOptimized(type, property, aggregateQuery);
+ public Map<String, Long> getAggregate(@PathParam("type") String type, @PathParam("property") String property,
+ @QueryParam("optimizedQuery") boolean optimizedQuery, AggregateQuery aggregateQuery) {
+ if (optimizedQuery) {
+ return queryService.getAggregateWithOptimizedQuery(type, property, aggregateQuery);
+ } else {
+ return queryService.getAggregate(type, property, aggregateQuery);
+ }
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/f579e142/services/src/main/java/org/apache/unomi/services/services/QueryServiceImpl.java
----------------------------------------------------------------------
diff --git a/services/src/main/java/org/apache/unomi/services/services/QueryServiceImpl.java b/services/src/main/java/org/apache/unomi/services/services/QueryServiceImpl.java
index 5da7076..bdbc9d1 100644
--- a/services/src/main/java/org/apache/unomi/services/services/QueryServiceImpl.java
+++ b/services/src/main/java/org/apache/unomi/services/services/QueryServiceImpl.java
@@ -62,7 +62,7 @@ public class QueryServiceImpl implements QueryService {
}
@Override
- public Map<String, Long> getAggregateOptimized(String itemType, String property, AggregateQuery query) {
+ public Map<String, Long> getAggregateWithOptimizedQuery(String itemType, String property, AggregateQuery query) {
return getAggregate(itemType, property, query, true);
}
@@ -82,7 +82,7 @@ public class QueryServiceImpl implements QueryService {
return persistenceService.queryCount(condition, itemType);
}
- private Map<String, Long> getAggregate(String itemType, String property, AggregateQuery query, boolean optimized) {
+ private Map<String, Long> getAggregate(String itemType, String property, AggregateQuery query, boolean optimizedQuery) {
if (query != null) {
// resolve condition
if (query.getCondition() != null) {
@@ -115,8 +115,8 @@ public class QueryServiceImpl implements QueryService {
}
// fall back on terms aggregate
- if (optimized) {
- return persistenceService.aggregateQueryOptimized(query.getCondition(), baseAggregate, itemType);
+ if (optimizedQuery) {
+ return persistenceService.aggregateWithOptimizedQuery(query.getCondition(), baseAggregate, itemType);
} else {
return persistenceService.aggregateQuery(query.getCondition(), baseAggregate, itemType);
}
[6/7] incubator-unomi git commit: UNOMI-186 improve deprecation
marking
Posted by dg...@apache.org.
UNOMI-186 improve deprecation marking
Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/d9e9a8f4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/d9e9a8f4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/d9e9a8f4
Branch: refs/heads/master
Commit: d9e9a8f49eab227930511d9cc8333a847968de0c
Parents: d5d8450
Author: dgaillard <dg...@jahia.com>
Authored: Fri Jun 29 12:11:34 2018 +0200
Committer: dgaillard <dg...@jahia.com>
Committed: Fri Jun 29 12:11:34 2018 +0200
----------------------------------------------------------------------
api/src/main/java/org/apache/unomi/api/Parameter.java | 5 ++++-
.../org/apache/unomi/api/services/PersonalizationService.java | 1 +
.../java/org/apache/unomi/api/services/PrivacyService.java | 7 +++++--
.../main/java/org/apache/unomi/api/services/QueryService.java | 1 +
.../elasticsearch/ElasticSearchPersistenceServiceImpl.java | 5 ++++-
.../org/apache/unomi/persistence/spi/PersistenceService.java | 1 +
.../main/java/org/apache/unomi/rest/RulesServiceEndPoint.java | 1 +
.../java/org/apache/unomi/rest/ScoringServiceEndPoint.java | 3 ++-
.../java/org/apache/unomi/rest/SegmentServiceEndPoint.java | 1 +
.../unomi/services/services/DefinitionsServiceImpl.java | 6 +++++-
.../org/apache/unomi/services/services/QueryServiceImpl.java | 5 ++++-
11 files changed, 29 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d9e9a8f4/api/src/main/java/org/apache/unomi/api/Parameter.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/unomi/api/Parameter.java b/api/src/main/java/org/apache/unomi/api/Parameter.java
index c8a1f9e..c59fcab 100644
--- a/api/src/main/java/org/apache/unomi/api/Parameter.java
+++ b/api/src/main/java/org/apache/unomi/api/Parameter.java
@@ -47,7 +47,10 @@ public class Parameter implements Serializable {
return multivalued;
}
- @Deprecated // As of version 1.1.0-incubating
+ /**
+ * @deprecated As of version 1.1.0-incubating
+ */
+ @Deprecated
public void setChoiceListInitializerFilter(String choiceListInitializerFilter) {
// Avoid errors when deploying old definitions
}
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d9e9a8f4/api/src/main/java/org/apache/unomi/api/services/PersonalizationService.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/unomi/api/services/PersonalizationService.java b/api/src/main/java/org/apache/unomi/api/services/PersonalizationService.java
index d8df08c..ad6e3a6 100644
--- a/api/src/main/java/org/apache/unomi/api/services/PersonalizationService.java
+++ b/api/src/main/java/org/apache/unomi/api/services/PersonalizationService.java
@@ -133,6 +133,7 @@ public interface PersonalizationService {
* @param filterid the filter identifier associated with this content filtering definition
* @deprecated As of version 1.3.0-incubating, please use {@link #setId(String)} instead
*/
+ @Deprecated
public void setFilterid(String filterid) {
this.id = filterid;
}
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d9e9a8f4/api/src/main/java/org/apache/unomi/api/services/PrivacyService.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/unomi/api/services/PrivacyService.java b/api/src/main/java/org/apache/unomi/api/services/PrivacyService.java
index 4b67caf..d860b7c 100644
--- a/api/src/main/java/org/apache/unomi/api/services/PrivacyService.java
+++ b/api/src/main/java/org/apache/unomi/api/services/PrivacyService.java
@@ -149,23 +149,26 @@ public interface PrivacyService {
* @deprecated As of version 1.3.0-incubating, do not use this method, instead mark properties with the personal identifier tag which
* will mark them as denied by the getDeniedProperties method
*/
+ @Deprecated
Boolean setDeniedProperties(String profileId, List<String> propertyNames);
/**
* This method doesn't do anything anymore please don't use it
- * @deprecated As of version 1.3.0-incubating, do not use this method
* @param profileId the identifier of the profile
* @return do not use
+ * @deprecated As of version 1.3.0-incubating, do not use this method
*/
+ @Deprecated
List<String> getDeniedPropertyDistribution(String profileId);
/**
* This method doesn't do anything anymore please don't use it
- * @deprecated As of version 1.3.0-incubating, do not use this method
* @param profileId the identifier of the profile
* @param propertyNames do not use
* @return do not use
+ * @deprecated As of version 1.3.0-incubating, do not use this method
*/
+ @Deprecated
Boolean setDeniedPropertyDistribution(String profileId, List<String> propertyNames);
/**
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d9e9a8f4/api/src/main/java/org/apache/unomi/api/services/QueryService.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/unomi/api/services/QueryService.java b/api/src/main/java/org/apache/unomi/api/services/QueryService.java
index 208277b..c397fda 100644
--- a/api/src/main/java/org/apache/unomi/api/services/QueryService.java
+++ b/api/src/main/java/org/apache/unomi/api/services/QueryService.java
@@ -53,6 +53,7 @@ public interface QueryService {
* @see Item Item for a discussion of {@code ITEM_TYPE}
* @deprecated As of 1.3.0-incubating, please use {@link #getAggregateWithOptimizedQuery(String, String, AggregateQuery)} instead
*/
+ @Deprecated
Map<String, Long> getAggregate(String itemType, String property, AggregateQuery query);
/**
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d9e9a8f4/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java
----------------------------------------------------------------------
diff --git a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java
index e63f928..def798f 100644
--- a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java
+++ b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java
@@ -1481,7 +1481,10 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
}.catchingExecuteInClassLoader(true);
}
- @Deprecated // As of version 1.3.0-incubating
+ /**
+ * @deprecated As of version 1.3.0-incubating, use {@link #aggregateWithOptimizedQuery(Condition, BaseAggregate, String)} instead
+ */
+ @Deprecated
@Override
public Map<String, Long> aggregateQuery(Condition filter, BaseAggregate aggregate, String itemType) {
return aggregateQuery(filter, aggregate, itemType, false);
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d9e9a8f4/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PersistenceService.java
----------------------------------------------------------------------
diff --git a/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PersistenceService.java b/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PersistenceService.java
index 1b673be..ede120d 100644
--- a/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PersistenceService.java
+++ b/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PersistenceService.java
@@ -421,6 +421,7 @@ public interface PersistenceService {
* @return a Map associating aggregation dimension name as key and cardinality for that dimension as value
* @deprecated As of 1.3.0-incubating, please use {@link #aggregateWithOptimizedQuery(Condition, BaseAggregate, String)} instead
*/
+ @Deprecated
Map<String, Long> aggregateQuery(Condition filter, BaseAggregate aggregate, String itemType);
/**
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d9e9a8f4/rest/src/main/java/org/apache/unomi/rest/RulesServiceEndPoint.java
----------------------------------------------------------------------
diff --git a/rest/src/main/java/org/apache/unomi/rest/RulesServiceEndPoint.java b/rest/src/main/java/org/apache/unomi/rest/RulesServiceEndPoint.java
index 1e7e37c..f27a95e 100644
--- a/rest/src/main/java/org/apache/unomi/rest/RulesServiceEndPoint.java
+++ b/rest/src/main/java/org/apache/unomi/rest/RulesServiceEndPoint.java
@@ -165,6 +165,7 @@ public class RulesServiceEndPoint {
*
* @deprecated As of version 1.1.0-incubating, not needed anymore
*/
+ @Deprecated
@GET
@Path("/resetQueries")
public void resetQueries() {
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d9e9a8f4/rest/src/main/java/org/apache/unomi/rest/ScoringServiceEndPoint.java
----------------------------------------------------------------------
diff --git a/rest/src/main/java/org/apache/unomi/rest/ScoringServiceEndPoint.java b/rest/src/main/java/org/apache/unomi/rest/ScoringServiceEndPoint.java
index 6001c97..599a42f 100644
--- a/rest/src/main/java/org/apache/unomi/rest/ScoringServiceEndPoint.java
+++ b/rest/src/main/java/org/apache/unomi/rest/ScoringServiceEndPoint.java
@@ -131,7 +131,7 @@ public class ScoringServiceEndPoint {
* @param validate whether or not to perform validation
* @return a list of impacted items metadata if any or an empty list if none were found or validation was skipped
*/
- @DELETE
+ @DELETE
@Path("/{scoringID}")
public DependentMetadata removeScoringDefinition(@PathParam("scoringID") String scoringId, @QueryParam("validate") boolean validate) {
return segmentService.removeScoringDefinition(scoringId, validate);
@@ -155,6 +155,7 @@ public class ScoringServiceEndPoint {
*
* @deprecated As of version 1.1.0-incubating, not needed anymore
*/
+ @Deprecated
@GET
@Path("/resetQueries")
public void resetQueries() {
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d9e9a8f4/rest/src/main/java/org/apache/unomi/rest/SegmentServiceEndPoint.java
----------------------------------------------------------------------
diff --git a/rest/src/main/java/org/apache/unomi/rest/SegmentServiceEndPoint.java b/rest/src/main/java/org/apache/unomi/rest/SegmentServiceEndPoint.java
index 33da462..5d0e09c 100644
--- a/rest/src/main/java/org/apache/unomi/rest/SegmentServiceEndPoint.java
+++ b/rest/src/main/java/org/apache/unomi/rest/SegmentServiceEndPoint.java
@@ -183,6 +183,7 @@ public class SegmentServiceEndPoint {
*
* @deprecated As of version 1.1.0-incubating, not needed anymore
*/
+ @Deprecated
@GET
@Path("/resetQueries")
public void resetQueries() {
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d9e9a8f4/services/src/main/java/org/apache/unomi/services/services/DefinitionsServiceImpl.java
----------------------------------------------------------------------
diff --git a/services/src/main/java/org/apache/unomi/services/services/DefinitionsServiceImpl.java b/services/src/main/java/org/apache/unomi/services/services/DefinitionsServiceImpl.java
index 62be8bb..eacd270 100644
--- a/services/src/main/java/org/apache/unomi/services/services/DefinitionsServiceImpl.java
+++ b/services/src/main/java/org/apache/unomi/services/services/DefinitionsServiceImpl.java
@@ -26,6 +26,7 @@ import org.apache.unomi.api.conditions.ConditionType;
import org.apache.unomi.api.services.DefinitionsService;
import org.apache.unomi.persistence.spi.CustomObjectMapper;
import org.apache.unomi.persistence.spi.PersistenceService;
+import org.apache.unomi.persistence.spi.aggregate.BaseAggregate;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleEvent;
@@ -379,7 +380,10 @@ public class DefinitionsServiceImpl implements DefinitionsService, SynchronousBu
}
}
- @Deprecated // As of version 1.2.0-incubating
+ /**
+ * @deprecated As of version 1.2.0-incubating, use {@link #extractConditionBySystemTag(Condition, String)} instead
+ */
+ @Deprecated
public Condition extractConditionByTag(Condition rootCondition, String tag) {
if (rootCondition.containsParameter("subConditions")) {
@SuppressWarnings("unchecked")
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d9e9a8f4/services/src/main/java/org/apache/unomi/services/services/QueryServiceImpl.java
----------------------------------------------------------------------
diff --git a/services/src/main/java/org/apache/unomi/services/services/QueryServiceImpl.java b/services/src/main/java/org/apache/unomi/services/services/QueryServiceImpl.java
index d5aa81a..e03ddb2 100644
--- a/services/src/main/java/org/apache/unomi/services/services/QueryServiceImpl.java
+++ b/services/src/main/java/org/apache/unomi/services/services/QueryServiceImpl.java
@@ -56,7 +56,10 @@ public class QueryServiceImpl implements QueryService {
return persistenceService.aggregateWithOptimizedQuery(null, new TermsAggregate(property), itemType);
}
- @Deprecated // As of version 1.3.0-incubating
+ /**
+ * @deprecated As of version 1.3.0-incubating, use {@link #getAggregateWithOptimizedQuery(String, String, AggregateQuery)} instead
+ */
+ @Deprecated
@Override
public Map<String, Long> getAggregate(String itemType, String property, AggregateQuery query) {
return getAggregate(itemType, property, query, false);