Re: [PROPOSAL] Change default Unomi SSH port

2017-03-20 Thread Abdelkader Midani
Hi, 

Good idea. I don’t see any problem with this, except that the new port is 
already in use (Nothing to do for this if it’s not the message displayed in the 
log)

cheers
Cordialement / Best regards

Abdelkader Midani
Senior Software Engineer

T +33 1 44 79 37 99 | M +33 6 72 57 93 40
8 rue du Sentier | 75002 Paris | France
jahia.com 
SKYPE  | TWITTER  | 
VCARD 

> JAHIA  empowers organizations to create sophisticated 
> websites that drive their business growth

> On 20 Mar 2017, at 16:03, Serge Huber  wrote:
> 
> Hi guys, 
> 
> I’d like to propose that we change the default port for the SSH server, 
> because it might conflict with other Karaf instances running on the same 
> machine. I was thinking about something like 8102 or 8201. 
> 
> I’m not sure if there are any problems that might result from doing this 
> apart from documentation changes ? 
> 
> I’d love to hear from JB on this too, if this is a bad idea and why :) 
> 
> cheers,
>  Serge…



[jira] [Resolved] (UNOMI-87) Rewrite the queries for the scroring plans update

2017-03-20 Thread Abdelkader Midani (JIRA)

 [ 
https://issues.apache.org/jira/browse/UNOMI-87?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Abdelkader Midani resolved UNOMI-87.

Resolution: Fixed

> Rewrite the queries for the scroring plans update
> -
>
> Key: UNOMI-87
> URL: https://issues.apache.org/jira/browse/UNOMI-87
> Project: Apache Unomi
>  Issue Type: Improvement
>  Components: core
>Affects Versions: 1.2.0-incubating
>Reporter: Abdelkader Midani
>Assignee: Abdelkader Midani
> Fix For: 1.2.0-incubating
>
>
> Queries for the scoring plans update should be rewritten to be ES 5 compliant 
> and Groovy Scripts should be converted to Painless Scripts



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[PROPOSAL] Change default Unomi SSH port

2017-03-20 Thread Serge Huber
Hi guys, 

I’d like to propose that we change the default port for the SSH server, because 
it might conflict with other Karaf instances running on the same machine. I was 
thinking about something like 8102 or 8201. 

I’m not sure if there are any problems that might result from doing this apart 
from documentation changes ? 

I’d love to hear from JB on this too, if this is a bad idea and why :) 

cheers,
  Serge… 

incubator-unomi git commit: UNOMI-87 : Rewrite the queries for the scroring plans update

2017-03-20 Thread amidani
Repository: incubator-unomi
Updated Branches:
  refs/heads/master cd3bc9ff0 -> 2f687915a


UNOMI-87 : Rewrite the queries for the scroring plans update


Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/2f687915
Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/2f687915
Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/2f687915

Branch: refs/heads/master
Commit: 2f687915a8929af291e43ee2536ba4208e752496
Parents: cd3bc9f
Author: Abdelkader Midani 
Authored: Mon Mar 20 12:09:36 2017 +0100
Committer: Abdelkader Midani 
Committed: Mon Mar 20 12:09:42 2017 +0100

--
 .../ElasticSearchPersistenceServiceImpl.java| 124 ++-
 ...g.apache.unomi.persistence.elasticsearch.cfg |   4 +-
 persistence-elasticsearch/pom.xml   |   1 -
 .../persistence/spi/PersistenceService.java |  12 ++
 .../PropertyConditionESQueryBuilder.java|   3 +
 .../conditions/PropertyConditionEvaluator.java  |   3 -
 pom.xml |   2 +-
 .../services/services/SegmentServiceImpl.java   | 119 +-
 8 files changed, 169 insertions(+), 99 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/2f687915/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 e2d1645..4e66418 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
@@ -56,7 +56,11 @@ import org.elasticsearch.index.IndexNotFoundException;
 import org.elasticsearch.index.query.QueryBuilder;
 import org.elasticsearch.index.query.QueryBuilders;
 import org.elasticsearch.index.query.RangeQueryBuilder;
+import org.elasticsearch.index.reindex.BulkIndexByScrollResponse;
+import org.elasticsearch.index.reindex.UpdateByQueryAction;
+import org.elasticsearch.index.reindex.UpdateByQueryRequestBuilder;
 import org.elasticsearch.script.Script;
+import org.elasticsearch.script.ScriptException;
 import org.elasticsearch.script.ScriptType;
 import org.elasticsearch.search.SearchHit;
 import org.elasticsearch.search.SearchHits;
@@ -92,22 +96,21 @@ import java.util.*;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 
+import static org.elasticsearch.index.query.QueryBuilders.termQuery;
+
 @SuppressWarnings("rawtypes")
 public class ElasticSearchPersistenceServiceImpl implements 
PersistenceService, SynchronousBundleListener {
 
-private static final Logger logger = 
LoggerFactory.getLogger(ElasticSearchPersistenceServiceImpl.class.getName());
-
 public static final String NUMBER_OF_SHARDS = "number_of_shards";
 public static final String NUMBER_OF_REPLICAS = "number_of_replicas";
 public static final String CLUSTER_NAME = "cluster.name";
-
 public static final String BULK_PROCESSOR_NAME = "bulkProcessor.name";
 public static final String BULK_PROCESSOR_CONCURRENT_REQUESTS = 
"bulkProcessor.concurrentRequests";
 public static final String BULK_PROCESSOR_BULK_ACTIONS = 
"bulkProcessor.bulkActions";
 public static final String BULK_PROCESSOR_BULK_SIZE = 
"bulkProcessor.bulkSize";
 public static final String BULK_PROCESSOR_FLUSH_INTERVAL = 
"bulkProcessor.flushInterval";
 public static final String BULK_PROCESSOR_BACKOFF_POLICY = 
"bulkProcessor.backoffPolicy";
-
+private static final Logger logger = 
LoggerFactory.getLogger(ElasticSearchPersistenceServiceImpl.class.getName());
 private TransportClient client;
 private BulkProcessor bulkProcessor;
 private String elasticSearchAddresses;
@@ -123,7 +126,7 @@ public class ElasticSearchPersistenceServiceImpl implements 
PersistenceService,
 private ConditionEvaluatorDispatcher conditionEvaluatorDispatcher;
 private ConditionESQueryBuilderDispatcher 
conditionESQueryBuilderDispatcher;
 
-private Map indexNames;
+private Map indexNames;
 private List itemsMonthlyIndexed;
 private Map routingByType;
 private Set existingIndexNames = new TreeSet();
@@ -135,7 +138,7 @@ public class ElasticSearchPersistenceServiceImpl implements 
PersistenceService,
 

Re: ES Queries, Scripts for scoring rewritten.

2017-03-20 Thread Serge Huber

Thanks Abdel, looking forward to this contribution.

cheers,
  Serge…


> On 20 Mar 2017, at 11:58, Abdelkader Midani  wrote:
> 
> Hi all,
> 
> Following the upgrade of ES to the version 5.1 - 5.2, a document version 
> conflicts was detected when updating scoring plans in certain cases. This 
> part of the code is rewritten to be ES 5 compliant, and Groovy scripts 
> (Deprecated as of ES 5) are converted into “Painless” scripts. All of this 
> should be committed very soon and will be part of the Version 
> 1.2.0-incubating.
> 
> Cheers
> Cordialement / Best regards
> 
> Abdelkader Midani
> Senior Software Engineer
> 
> T +33 1 44 79 37 99 | M +33 6 72 57 93 40
> 8 rue du Sentier | 75002 Paris | France
> jahia.com 
> SKYPE  | TWITTER  | 
> VCARD 
> 
>> JAHIA  empowers organizations to create sophisticated 
>> websites that drive their business growth
> 



[jira] [Created] (UNOMI-87) Rewrite the queries for the scroring plans update

2017-03-20 Thread Abdelkader Midani (JIRA)
Abdelkader Midani created UNOMI-87:
--

 Summary: Rewrite the queries for the scroring plans update
 Key: UNOMI-87
 URL: https://issues.apache.org/jira/browse/UNOMI-87
 Project: Apache Unomi
  Issue Type: Improvement
  Components: core
Affects Versions: 1.2.0-incubating
Reporter: Abdelkader Midani
Assignee: Abdelkader Midani
 Fix For: 1.2.0-incubating


Queries for the scoring plans update should be rewritten to be ES 5 compliant 
and Groovy Scripts should be converted to Painless Scripts



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


ES Queries, Scripts for scoring rewritten.

2017-03-20 Thread Abdelkader Midani
Hi all,

Following the upgrade of ES to the version 5.1 - 5.2, a document version 
conflicts was detected when updating scoring plans in certain cases. This part 
of the code is rewritten to be ES 5 compliant, and Groovy scripts (Deprecated 
as of ES 5) are converted into “Painless” scripts. All of this should be 
committed very soon and will be part of the Version 1.2.0-incubating.

Cheers
Cordialement / Best regards

Abdelkader Midani
Senior Software Engineer

T +33 1 44 79 37 99 | M +33 6 72 57 93 40
8 rue du Sentier | 75002 Paris | France
jahia.com 
SKYPE  | TWITTER  | 
VCARD 

> JAHIA  empowers organizations to create sophisticated 
> websites that drive their business growth