minor fixes
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/social-networking/social-data-indexing-common@141581 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
cccb6275f4
commit
41ddcd35a5
|
@ -1,4 +1,8 @@
|
|||
<ReleaseNotes>
|
||||
<Changeset component="org.gcube.socialnetworking.social-data-indexing-common.1-0-1"
|
||||
date="2017-02-01">
|
||||
<Change>Minor fixes</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.socialnetworking.social-data-indexing-common.1-0-0"
|
||||
date="2016-02-29">
|
||||
<Change>First Release</Change>
|
||||
|
|
|
@ -28,7 +28,7 @@ import org.slf4j.LoggerFactory;
|
|||
public class ElasticSearchRunningCluster {
|
||||
|
||||
//logger
|
||||
private static final Logger _log = LoggerFactory.getLogger(ElasticSearchRunningCluster.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(ElasticSearchRunningCluster.class);
|
||||
|
||||
//properties
|
||||
private final static String RUNTIME_RESOURCE_NAME = "SocialPortalDataIndex";
|
||||
|
@ -46,19 +46,19 @@ public class ElasticSearchRunningCluster {
|
|||
List<ServiceEndpoint> resources = getConfigurationFromIS(infrastructure);
|
||||
|
||||
if (resources.size() > 1) {
|
||||
_log.error("Too many Runtime Resource having name " + RUNTIME_RESOURCE_NAME +" in this scope");
|
||||
logger.error("Too many Runtime Resource having name " + RUNTIME_RESOURCE_NAME +" in this scope");
|
||||
throw new TooManyRunningClustersException("There exist more than 1 Runtime Resource in this scope having name "
|
||||
+ RUNTIME_RESOURCE_NAME + " and Platform " + PLATFORM_NAME + ". Only one allowed per infrasrtucture.");
|
||||
}
|
||||
else if (resources.size() == 0){
|
||||
_log.error("There is no Runtime Resource having name " + RUNTIME_RESOURCE_NAME +" and Platform " + PLATFORM_NAME + " in this scope.");
|
||||
logger.error("There is no Runtime Resource having name " + RUNTIME_RESOURCE_NAME +" and Platform " + PLATFORM_NAME + " in this scope.");
|
||||
throw new NoElasticSearchRuntimeResourceException();
|
||||
}
|
||||
else {
|
||||
|
||||
try{
|
||||
|
||||
_log.debug(resources.toString());
|
||||
logger.debug(resources.toString());
|
||||
for (ServiceEndpoint res : resources) {
|
||||
|
||||
Iterator<AccessPoint> accessPointIterator = res.profile().accessPoints().iterator();
|
||||
|
@ -81,12 +81,12 @@ public class ElasticSearchRunningCluster {
|
|||
}
|
||||
}catch(Exception e ){
|
||||
|
||||
_log.error(e.toString());
|
||||
logger.error(e.toString());
|
||||
throw new ServiceEndPointException();
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
_log.error(e.toString());
|
||||
logger.error(e.toString());
|
||||
throw e;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,24 +2,14 @@ package org.gcube.socialnetworking.social_data_indexing_common.utils;
|
|||
|
||||
/**
|
||||
* The fields used to build up the index.
|
||||
* @author Costantino Perciante at ISTI-CNR
|
||||
* (costantino.perciante@isti.cnr.it)
|
||||
*
|
||||
* @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
|
||||
*/
|
||||
public class IndexFields {
|
||||
|
||||
|
||||
// name of the index
|
||||
public static final String INDEX_NAME = "social";
|
||||
|
||||
|
||||
// table for enhanced feeds
|
||||
public static final String EF_FEEDS_TABLE = "enhanced_feeds";
|
||||
|
||||
// enhanced feeds' fields of interest
|
||||
public static final String EF_ATTACHMENT_NAME = "attachments.name";
|
||||
public static final String EF_FEED_TEXT = "feed.description";
|
||||
public static final String EF_COMMENT_TEXT = "comments.text";
|
||||
public static final String EF_PREVIEW_DESCRIPTION = "feed.linkTitle";
|
||||
public static final String EF_FEED_AUTHOR = "feed.fullName";
|
||||
public static final String EF_FEED_VRE_ID = "feed.vreid";
|
||||
public static final String EF_COMMENT_FULL_NAME = "comments.fullName";
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
package org.gcube.socialnetworking.social_data_indexing_common.utils;
|
||||
|
||||
/**
|
||||
* The fields of the documents which are searchable.
|
||||
* @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
|
||||
*/
|
||||
public enum SearchableFields {
|
||||
|
||||
// enhanced posts' fields of interest
|
||||
public static final String ATTACHMENT_NAME = "attachments.name";
|
||||
public static final String POST_TEXT = "feed.description";
|
||||
public static final String COMMENT_TEXT = "comments.text";
|
||||
public static final String PREVIEW_DESCRIPTION = "feed.linkTitle";
|
||||
public static final String POST_AUTHOR = "feed.fullName";
|
||||
public static final String POST_VRE_ID = "feed.vreid";
|
||||
public static final String COMMENT_AUTHOR = "comments.fullName";
|
||||
|
||||
}
|
Loading…
Reference in New Issue