public class FullTextNode extends Object implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
FullTextNode.Builder |
| Modifier and Type | Field and Description |
|---|---|
static String |
ACTIVE_INDEX |
static String |
ALL_INDEXES |
static String |
DEFAULT_ANALYZER |
static String |
DEFAULT_INDEXSTORE |
static String |
KEYWORD_ANALYZER |
static String |
META_INDEX |
| Constructor and Description |
|---|
FullTextNode(FullTextNode.Builder builder) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
activateIndex(String indexName) |
static void |
addFile(org.elasticsearch.client.Client indexClient,
String base64,
String indexName,
String indexType) |
void |
addFile(String base64) |
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
|
List<ClusterResponse> |
cluster(String query,
String queryHint,
Integer numberOfClusters,
String urlField,
List<String> titleFields,
List<String> contentFields,
List<String> languageFields,
Set<String> sids,
String algorithm,
Integer searchHits) |
void |
commit() |
void |
commit(String indexName) |
void |
commitMeta()
Commits the changes to the index by sending a flush and a refresh request
|
Boolean |
createFileIndex() |
static Boolean |
createFileIndex(org.elasticsearch.client.Client indexClient,
String indexName,
String indexType,
org.elasticsearch.common.settings.Settings settings) |
void |
createOrJoinCluster() |
boolean |
deactivateIndex(String indexName) |
boolean |
deleteAll() |
Boolean |
deleteCollection(String collID)
Deletes the documents of the collection with ID collID
|
boolean |
deleteDocuments(List<String> docIDs)
Deletes the documents with IDs within the list docIDs
|
boolean |
deleteIndex()
Deletes the index and the metaIndex
|
boolean |
deleteIndex(String indexName)
Deletes the index
|
boolean |
deleteMeta() |
boolean |
deleteTempIndex(String indexName)
Deletes the temp index which was not activated and no recreation is needed
|
boolean |
feedLocator(String resultSetLocation,
Set<String> securityIdentifiers) |
Boolean |
feedLocator(String resultSetLocation,
String indexName,
Set<String> securityIdentifiers)
Feeds the index with rowsets that are read from the the given locator
|
boolean |
feedRowset(String rowset,
String indexName,
Set<String> securityIdentifiers)
Feeds the index with a rowset.
|
Map<String,Integer> |
frequentTerms(String queryString,
Integer maxTerms,
Set<String> securityIdentifiers) |
Map<String,Integer> |
frequentTerms(String queryString,
Integer maxTerms,
Set<String> securityIdentifiers,
Boolean useRR) |
Map<String,Integer> |
frequentTerms(String queryString,
Set<String> securityIdentifiers) |
Map<String,Integer> |
frequentTerms(String queryString,
Set<String> securityIdentifiers,
Boolean useRR) |
List<String> |
getAllCollections() |
String |
getClusterName() |
Long |
getCollectionDocumentsCount(String collectionID) |
Map<String,List<String>> |
getCollectionsAndFieldsOfIndexFromMeta() |
List<String> |
getCollectionsFromMeta() |
Set<String> |
getCollectionsOfIndex(String indexName) |
String |
getESTransportAddress() |
List<String> |
getFieldsFromMeta() |
String |
getHostname() |
org.elasticsearch.client.Client |
getIndexClient() |
String |
getIndexName() |
Set<String> |
getIndicesOfCollection(String collection) |
Set<String> |
getLanguagesOfCollection(String collection) |
Integer |
getMaxFragmentCnt() |
Integer |
getMaxFragmentSize() |
Integer |
getNoOfReplicas() |
Integer |
getNoOfShards() |
String |
getScope() |
void |
invalidateCache() |
void |
joinCluster(List<String> hosts) |
void |
listAlgorithms() |
String |
query(String queryString,
Integer from,
Integer maxHits,
Set<String> securityIdentifiers)
Executes the query of gRS2 locator of maximum maxHits records (if >0)
|
String |
query(String queryString,
Integer from,
Integer maxHits,
Set<String> securityIdentifiers,
Boolean useRR) |
String |
query(String queryString,
Set<String> securityIdentifiers) |
String |
query(String queryString,
Set<String> securityIdentifiers,
Boolean useRR) |
String |
queryStream(String queryString,
int maxHits,
Set<String> securityIdentifiers)
Important: The returned results are not sorted!
|
String |
queryStream(String queryString,
Set<String> securityIdentifiers) |
boolean |
rebuildMetaIndex(List<String> collectionIds,
List<String> fields) |
void |
recreateMetaIndex() |
void |
refreshIndexTypesOfIndex()
Refreshes the index types
|
String |
toString() |
public static String META_INDEX
public static String ACTIVE_INDEX
public static String ALL_INDEXES
public static String DEFAULT_INDEXSTORE
public static String DEFAULT_ANALYZER
public static String KEYWORD_ANALYZER
public FullTextNode(FullTextNode.Builder builder) 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 String getHostname()
public Integer getMaxFragmentCnt()
public Integer getMaxFragmentSize()
public org.elasticsearch.client.Client getIndexClient()
public void addIndexType(String indexTypeStr, String indexName) throws org.gcube.indexmanagement.common.IndexException
org.gcube.indexmanagement.common.IndexExceptionpublic void addIndexType(String indexTypeStr, org.gcube.indexmanagement.common.FullTextIndexType indexType, String indexName) throws org.gcube.indexmanagement.common.IndexException
org.gcube.indexmanagement.common.IndexExceptionpublic void createOrJoinCluster()
public String getESTransportAddress()
public void joinCluster(List<String> hosts) throws IOException
knownNodes - list of hostname:portIOExceptionpublic void close()
public 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, Set<String> securityIdentifiers, Boolean useRR) 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 query(String queryString, Integer from, Integer maxHits, 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 query(String queryString, Integer from, Integer maxHits, Set<String> securityIdentifiers, Boolean useRR) throws gr.uoa.di.madgik.grs.writer.GRS2WriterException, org.gcube.indexmanagement.common.IndexException
gr.uoa.di.madgik.grs.writer.GRS2WriterExceptionorg.gcube.indexmanagement.common.IndexExceptionpublic Map<String,Integer> frequentTerms(String queryString, Set<String> securityIdentifiers) throws org.gcube.indexmanagement.common.IndexException, gr.uoa.di.madgik.grs.writer.GRS2WriterException
org.gcube.indexmanagement.common.IndexExceptiongr.uoa.di.madgik.grs.writer.GRS2WriterExceptionpublic Map<String,Integer> frequentTerms(String queryString, Set<String> securityIdentifiers, Boolean useRR) throws org.gcube.indexmanagement.common.IndexException, gr.uoa.di.madgik.grs.writer.GRS2WriterException
org.gcube.indexmanagement.common.IndexExceptiongr.uoa.di.madgik.grs.writer.GRS2WriterExceptionpublic Map<String,Integer> frequentTerms(String queryString, Integer maxTerms, Set<String> securityIdentifiers) throws gr.uoa.di.madgik.grs.writer.GRS2WriterException, org.gcube.indexmanagement.common.IndexException
gr.uoa.di.madgik.grs.writer.GRS2WriterExceptionorg.gcube.indexmanagement.common.IndexExceptionpublic Map<String,Integer> frequentTerms(String queryString, Integer maxTerms, Set<String> securityIdentifiers, Boolean useRR) throws gr.uoa.di.madgik.grs.writer.GRS2WriterException, org.gcube.indexmanagement.common.IndexException
gr.uoa.di.madgik.grs.writer.GRS2WriterExceptionorg.gcube.indexmanagement.common.IndexExceptionpublic String queryStream(String queryString, Set<String> securityIdentifiers) 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, 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 boolean activateIndex(String indexName)
public boolean deactivateIndex(String indexName)
public boolean deleteIndex()
public boolean deleteMeta()
public boolean deleteAll()
public boolean deleteIndex(String indexName)
public boolean deleteTempIndex(String indexName)
public boolean 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 boolean feedRowset(String rowset, String indexName, Set<String> securityIdentifiers)
public 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, 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 - gr.uoa.di.madgik.grs.reader.GRS2ReaderExceptionURISyntaxExceptiongr.uoa.di.madgik.grs.record.GRS2RecordDefinitionExceptiongr.uoa.di.madgik.grs.buffer.GRS2BufferExceptionpublic void refreshIndexTypesOfIndex()
public boolean addMetaIndex()
public void recreateMetaIndex()
public void invalidateCache()
public Map<String,List<String>> getCollectionsAndFieldsOfIndexFromMeta()
public Boolean createFileIndex()
public static Boolean createFileIndex(org.elasticsearch.client.Client indexClient, String indexName, String indexType, org.elasticsearch.common.settings.Settings settings)
public void addFile(String base64) throws IOException
IOExceptionpublic static void addFile(org.elasticsearch.client.Client indexClient,
String base64,
String indexName,
String indexType)
throws IOException
IOExceptionpublic List<ClusterResponse> cluster(String query, String queryHint, Integer numberOfClusters, String urlField, List<String> titleFields, List<String> contentFields, List<String> languageFields, Set<String> sids, String algorithm, Integer searchHits)
public void listAlgorithms()
Copyright © 2015. All Rights Reserved.