public class FullTextNode extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
static String |
ACTIVE_INDEX |
static String |
DEFAULT_ANALYZER |
static String |
DEFAULT_INDEXNAME |
static String |
INDEX_PREFIX |
static String |
KEYWORD_ANALYZER |
static String |
META_INDEX |
static String |
TEMP_PREFIX |
| Constructor and Description |
|---|
FullTextNode(String hostname) |
FullTextNode(String hostname,
Boolean useRRAdaptor) |
FullTextNode(String hostname,
String clusterName,
String indexName,
Integer noOfReplicas,
Integer noOfShards,
String scope,
int maxFragmentCnt,
int maxFragmentSize) |
FullTextNode(String hostname,
String clusterName,
String indexName,
Integer noOfReplicas,
Integer noOfShards,
String scope,
int maxFragmentCnt,
int maxFragmentSize,
Boolean useRRAdaptor) |
FullTextNode(String hostname,
String clusterName,
String indexName,
String scope) |
FullTextNode(String hostname,
String clusterName,
String indexName,
String scope,
Boolean useRRAdaptor) |
FullTextNode(String hostname,
String dataDir,
String clusterName,
String indexName,
Integer noOfReplicas,
Integer noOfShards,
String scope,
int maxFragmentCnt,
int maxFragmentSize) |
FullTextNode(String hostname,
String dataDir,
String clusterName,
String indexName,
Integer noOfReplicas,
Integer noOfShards,
String scope,
int maxFragmentCnt,
int maxFragmentSize,
Boolean useRRAdaptor) |
FullTextNode(String hostname,
String dataDir,
String clusterName,
String indexName,
String scope) |
FullTextNode(String hostname,
String dataDir,
String clusterName,
String indexName,
String scope,
Boolean useRRAdaptor) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
activateIndex(String indexName) |
void |
addIndexType(String indexTypeStr,
org.gcube.indexmanagement.common.FullTextIndexType indexType,
String indexName) |
void |
addIndexType(String indexTypeStr,
String indexName) |
boolean |
addMetaIndex() |
void |
clearIndex(String indexTypeName) |
void |
close()
Closes the index
|
void |
commit() |
void |
commit(String indexName) |
void |
commitMeta()
Commits the changes to the index by sending a flush and a refresh request
|
void |
createOrJoinCluster() |
boolean |
deactivateIndex(String indexName) |
boolean |
delete()
Deletes the index and the metaIndex
|
Boolean |
deleteCollection(String collID)
Deletes the documents of the collection with ID collID
|
void |
deleteDocuments(List<String> docIDs)
Deletes the documents with IDs within the list docIDs
|
boolean |
deleteIndex(String indexName)
Deletes the index and the metaIndex
|
boolean |
feedLocator(String resultSetLocation,
HashMap<String,org.gcube.indexmanagement.common.FullTextIndexType> colForField,
Set<String> securityIdentifiers) |
boolean |
feedLocator(String resultSetLocation,
HashMap<String,org.gcube.indexmanagement.common.FullTextIndexType> colForField,
String indexName,
Set<String> securityIdentifiers)
Feeds the index with rowsets that are read from the the given locator
|
boolean |
feedLocator(String resultSetLocation,
Set<String> securityIdentifiers) |
boolean |
feedLocator(String resultSetLocation,
String indexName,
Set<String> securityIdentifiers) |
boolean |
feedRowset(String rowset,
String indexName,
Set<String> securityIdentifiers)
Feeds the index with a rowset.
|
String |
getClusterName() |
Long |
getCollectionDocuments(String collectionID) |
Set<String> |
getCollectionsOfIndex(String indexName) |
List<String> |
getHighlightedFields() |
org.elasticsearch.client.Client |
getIndexClient() |
String |
getIndexName() |
Set<String> |
getIndicesOfCollection(String collection) |
int |
getMaxFragmentCnt() |
int |
getMaxFragmentSize() |
Integer |
getNoOfReplicas() |
Integer |
getNoOfShards() |
String |
getScope() |
void |
invalidateCache() |
void |
joinCluster(Map<String,Integer> knownNodes) |
String |
query(String queryString,
int maxHits,
int from,
Set<String> securityIdentifiers)
Executes the query of gRS2 locator of maximum maxHits records (if >0)
|
String |
query(String queryString,
Set<String> securityIdentifiers) |
String |
queryStream(String queryString) |
String |
queryStream(String queryString,
int maxHits)
Important: The returned results are not sorted!
|
boolean |
rebuildMetaIndex(List<String> collectionIds,
List<String> fields) |
void |
refreshIndexTypesOfIndex()
Refreshes the index types
|
void |
setHighlightedFields(List<String> highlightedFields) |
void |
setMaxResults(Integer maxResults) |
String |
toString() |
boolean |
updateManagerProperties(HashMap<String,org.gcube.indexmanagement.common.FullTextIndexType> colForIdTypes) |
boolean |
updateManagerPropertiesRemoveCollID(String collectionID) |
public static String META_INDEX
public static String TEMP_PREFIX
public static String INDEX_PREFIX
public static String ACTIVE_INDEX
public static String DEFAULT_INDEXNAME
public static String DEFAULT_ANALYZER
public static String KEYWORD_ANALYZER
public FullTextNode(String hostname) throws gr.uoa.di.madgik.rr.ResourceRegistryException, InterruptedException
gr.uoa.di.madgik.rr.ResourceRegistryExceptionInterruptedExceptionpublic FullTextNode(String hostname, Boolean useRRAdaptor) throws gr.uoa.di.madgik.rr.ResourceRegistryException, InterruptedException
gr.uoa.di.madgik.rr.ResourceRegistryExceptionInterruptedExceptionpublic FullTextNode(String hostname, String clusterName, String indexName, Integer noOfReplicas, Integer noOfShards, String scope, int maxFragmentCnt, int maxFragmentSize, Boolean useRRAdaptor) throws gr.uoa.di.madgik.rr.ResourceRegistryException, InterruptedException
gr.uoa.di.madgik.rr.ResourceRegistryExceptionInterruptedExceptionpublic FullTextNode(String hostname, String clusterName, String indexName, Integer noOfReplicas, Integer noOfShards, String scope, int maxFragmentCnt, int maxFragmentSize) throws gr.uoa.di.madgik.rr.ResourceRegistryException, InterruptedException
gr.uoa.di.madgik.rr.ResourceRegistryExceptionInterruptedExceptionpublic FullTextNode(String hostname, String clusterName, String indexName, String scope, Boolean useRRAdaptor) throws gr.uoa.di.madgik.rr.ResourceRegistryException, InterruptedException
gr.uoa.di.madgik.rr.ResourceRegistryExceptionInterruptedExceptionpublic FullTextNode(String hostname, String clusterName, String indexName, String scope) throws gr.uoa.di.madgik.rr.ResourceRegistryException, InterruptedException
gr.uoa.di.madgik.rr.ResourceRegistryExceptionInterruptedExceptionpublic FullTextNode(String hostname, String dataDir, String clusterName, String indexName, Integer noOfReplicas, Integer noOfShards, String scope, int maxFragmentCnt, int maxFragmentSize, Boolean useRRAdaptor) throws gr.uoa.di.madgik.rr.ResourceRegistryException, InterruptedException
gr.uoa.di.madgik.rr.ResourceRegistryExceptionInterruptedExceptionpublic FullTextNode(String hostname, String dataDir, String clusterName, String indexName, Integer noOfReplicas, Integer noOfShards, String scope, int maxFragmentCnt, int maxFragmentSize) throws gr.uoa.di.madgik.rr.ResourceRegistryException, InterruptedException
gr.uoa.di.madgik.rr.ResourceRegistryExceptionInterruptedExceptionpublic FullTextNode(String hostname, String dataDir, String clusterName, String indexName, String scope, Boolean useRRAdaptor) throws gr.uoa.di.madgik.rr.ResourceRegistryException, InterruptedException
gr.uoa.di.madgik.rr.ResourceRegistryExceptionInterruptedExceptionpublic FullTextNode(String hostname, String dataDir, String clusterName, String indexName, String scope) throws gr.uoa.di.madgik.rr.ResourceRegistryException, InterruptedException
gr.uoa.di.madgik.rr.ResourceRegistryExceptionInterruptedExceptionpublic String getClusterName()
public String getIndexName()
public Integer getNoOfReplicas()
public Integer getNoOfShards()
public String getScope()
public int getMaxFragmentCnt()
public int getMaxFragmentSize()
public org.elasticsearch.client.Client getIndexClient()
public void setMaxResults(Integer maxResults)
public void addIndexType(String indexTypeStr, String indexName) throws Exception
Exceptionpublic void addIndexType(String indexTypeStr, org.gcube.indexmanagement.common.FullTextIndexType indexType, String indexName) throws Exception
Exceptionpublic void createOrJoinCluster()
public void joinCluster(Map<String,Integer> knownNodes) throws IOException
knownNodes - Map of Address -> PortIOExceptionpublic String query(String queryString, Set<String> securityIdentifiers) throws org.gcube.indexmanagement.common.IndexException, gr.uoa.di.madgik.grs.writer.GRS2WriterException
queryString - org.gcube.indexmanagement.common.IndexExceptiongr.uoa.di.madgik.grs.writer.GRS2WriterExceptionpublic String query(String queryString, int maxHits, int from, Set<String> securityIdentifiers) throws gr.uoa.di.madgik.grs.writer.GRS2WriterException, org.gcube.indexmanagement.common.IndexException
queryString - maxHits - org.gcube.indexmanagement.common.IndexExceptiongr.uoa.di.madgik.grs.writer.GRS2WriterExceptionpublic String queryStream(String queryString) throws org.gcube.indexmanagement.common.IndexException, gr.uoa.di.madgik.grs.writer.GRS2WriterException
org.gcube.indexmanagement.common.IndexExceptiongr.uoa.di.madgik.grs.writer.GRS2WriterExceptionpublic String queryStream(String queryString, int maxHits) throws org.gcube.indexmanagement.common.IndexException, gr.uoa.di.madgik.grs.writer.GRS2WriterException
queryString - org.gcube.indexmanagement.common.IndexExceptiongr.uoa.di.madgik.grs.writer.GRS2WriterExceptionpublic boolean activateIndex(String indexName)
public boolean deactivateIndex(String indexName)
public boolean delete()
public boolean deleteIndex(String indexName)
public void deleteDocuments(List<String> docIDs)
docIDs - public Boolean deleteCollection(String collID)
collID - public void commitMeta()
public void commit()
public void commit(String indexName)
public void clearIndex(String indexTypeName)
public void close()
public boolean feedRowset(String rowset, String indexName, Set<String> securityIdentifiers)
public boolean feedLocator(String resultSetLocation, String indexName, Set<String> securityIdentifiers) throws gr.uoa.di.madgik.grs.reader.GRS2ReaderException, URISyntaxException, gr.uoa.di.madgik.grs.record.GRS2RecordDefinitionException, gr.uoa.di.madgik.grs.buffer.GRS2BufferException
gr.uoa.di.madgik.grs.reader.GRS2ReaderExceptionURISyntaxExceptiongr.uoa.di.madgik.grs.record.GRS2RecordDefinitionExceptiongr.uoa.di.madgik.grs.buffer.GRS2BufferExceptionpublic boolean feedLocator(String resultSetLocation, Set<String> securityIdentifiers) throws gr.uoa.di.madgik.grs.reader.GRS2ReaderException, URISyntaxException, gr.uoa.di.madgik.grs.record.GRS2RecordDefinitionException, gr.uoa.di.madgik.grs.buffer.GRS2BufferException
gr.uoa.di.madgik.grs.reader.GRS2ReaderExceptionURISyntaxExceptiongr.uoa.di.madgik.grs.record.GRS2RecordDefinitionExceptiongr.uoa.di.madgik.grs.buffer.GRS2BufferExceptionpublic boolean feedLocator(String resultSetLocation, HashMap<String,org.gcube.indexmanagement.common.FullTextIndexType> colForField, Set<String> securityIdentifiers) throws gr.uoa.di.madgik.grs.reader.GRS2ReaderException, URISyntaxException, gr.uoa.di.madgik.grs.record.GRS2RecordDefinitionException, gr.uoa.di.madgik.grs.buffer.GRS2BufferException
gr.uoa.di.madgik.grs.reader.GRS2ReaderExceptionURISyntaxExceptiongr.uoa.di.madgik.grs.record.GRS2RecordDefinitionExceptiongr.uoa.di.madgik.grs.buffer.GRS2BufferExceptionpublic boolean feedLocator(String resultSetLocation, HashMap<String,org.gcube.indexmanagement.common.FullTextIndexType> colForField, String indexName, Set<String> securityIdentifiers) throws gr.uoa.di.madgik.grs.reader.GRS2ReaderException, URISyntaxException, gr.uoa.di.madgik.grs.record.GRS2RecordDefinitionException, gr.uoa.di.madgik.grs.buffer.GRS2BufferException
resultSetLocation - colForField - gr.uoa.di.madgik.grs.reader.GRS2ReaderExceptionURISyntaxExceptiongr.uoa.di.madgik.grs.record.GRS2RecordDefinitionExceptiongr.uoa.di.madgik.grs.buffer.GRS2BufferExceptionpublic void refreshIndexTypesOfIndex()
public boolean updateManagerProperties(HashMap<String,org.gcube.indexmanagement.common.FullTextIndexType> colForIdTypes)
public boolean updateManagerPropertiesRemoveCollID(String collectionID)
public boolean addMetaIndex()
public void invalidateCache()
Copyright © 2014. All Rights Reserved.