org.gcube.elasticsearch.helpers
Class QueryParser
java.lang.Object
org.gcube.elasticsearch.helpers.QueryParser
public class QueryParser
- extends Object
|
Method Summary |
static org.gcube.indexmanagement.common.FullTextIndexType |
addFullTextIndexTypeIntoCache(String indexTypeStr,
String scope,
org.gcube.indexmanagement.common.FullTextIndexType indexType,
FTNodeCache cache)
|
static org.gcube.indexmanagement.lucenewrapper.LuceneGcqlQueryContainer |
convertToLuceneQuery(String query,
List<String> presentables,
List<String> seachables,
org.gcube.indexmanagement.resourceregistry.RRadaptor rradaptor)
|
static gr.uoa.di.madgik.grs.record.field.FieldDefinition[] |
createFieldDefinition(List<String> presentable,
List<String> projections,
org.gcube.indexmanagement.resourceregistry.RRadaptor adaptor)
|
static String |
createIndexTypekey(String indexType,
String scope)
|
static List<String> |
createPresentableForIndexTypes(Map<String,List<String>> presentableFieldsPerIndexType,
Set<String> indexTypes)
|
static List<String> |
createSearchablesForIndexTypes(Map<String,List<String>> searchablesFieldsPerIndexType,
Set<String> indexTypes)
|
static List<String> |
getCollectionsIDFromQuery(String queryString)
|
static Set<String> |
getIndexTypesByCollectionIDs(Map<String,Set<String>> indexTypesByCollIDs,
List<String> collIDs,
org.elasticsearch.client.Client client,
String indexName)
|
static String |
getLuceneQueryFromQueryString(org.gcube.indexmanagement.lucenewrapper.LuceneGcqlQueryContainer queryContainer)
|
static List<String> |
getProjectionsQueryFromQueryString(org.gcube.indexmanagement.lucenewrapper.LuceneGcqlQueryContainer queryContainer)
|
static gr.uoa.di.madgik.grs.writer.RecordWriter<gr.uoa.di.madgik.grs.record.GenericRecord> |
initRSWriterForSearchHits(List<String> presentables,
List<String> projections,
org.gcube.indexmanagement.resourceregistry.RRadaptor adaptor)
|
static boolean |
isDescendant(String descendantFieldName,
org.gcube.indexmanagement.common.IndexField parentField)
A method used to check if one field is the descendant of another. |
static org.gcube.indexmanagement.common.FullTextIndexType |
retrieveIndexType(String indexTypeStr,
org.gcube.common.core.scope.GCUBEScope gcubeScope,
FTNodeCache cache)
|
static org.gcube.indexmanagement.common.FullTextIndexType |
retrieveIndexType(String indexTypeStr,
String scope,
FTNodeCache cache)
|
static boolean |
writeSearchHitInResultSet(org.elasticsearch.search.SearchHit hit,
gr.uoa.di.madgik.grs.writer.RecordWriter<gr.uoa.di.madgik.grs.record.GenericRecord> rsWriter,
List<String> projections,
List<String> presentables,
int maxFragmentCount,
long rsTimeout)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
QueryParser
public QueryParser()
getIndexTypesByCollectionIDs
public static Set<String> getIndexTypesByCollectionIDs(Map<String,Set<String>> indexTypesByCollIDs,
List<String> collIDs,
org.elasticsearch.client.Client client,
String indexName)
createPresentableForIndexTypes
public static List<String> createPresentableForIndexTypes(Map<String,List<String>> presentableFieldsPerIndexType,
Set<String> indexTypes)
createSearchablesForIndexTypes
public static List<String> createSearchablesForIndexTypes(Map<String,List<String>> searchablesFieldsPerIndexType,
Set<String> indexTypes)
getCollectionsIDFromQuery
public static List<String> getCollectionsIDFromQuery(String queryString)
createFieldDefinition
public static gr.uoa.di.madgik.grs.record.field.FieldDefinition[] createFieldDefinition(List<String> presentable,
List<String> projections,
org.gcube.indexmanagement.resourceregistry.RRadaptor adaptor)
throws Exception
- Throws:
Exception
isDescendant
public static boolean isDescendant(String descendantFieldName,
org.gcube.indexmanagement.common.IndexField parentField)
- A method used to check if one field is the descendant of another.
- Parameters:
descendantFieldName - - The name of the field to check whether is the descendent.parentField - - The field to check whether is the ascendent.
- Returns:
- TRUE if parentField contains a descendent with a name which
equals (case insensitive) descendantFieldName.
createIndexTypekey
public static String createIndexTypekey(String indexType,
String scope)
retrieveIndexType
public static org.gcube.indexmanagement.common.FullTextIndexType retrieveIndexType(String indexTypeStr,
String scope,
FTNodeCache cache)
retrieveIndexType
public static org.gcube.indexmanagement.common.FullTextIndexType retrieveIndexType(String indexTypeStr,
org.gcube.common.core.scope.GCUBEScope gcubeScope,
FTNodeCache cache)
addFullTextIndexTypeIntoCache
public static org.gcube.indexmanagement.common.FullTextIndexType addFullTextIndexTypeIntoCache(String indexTypeStr,
String scope,
org.gcube.indexmanagement.common.FullTextIndexType indexType,
FTNodeCache cache)
writeSearchHitInResultSet
public static boolean writeSearchHitInResultSet(org.elasticsearch.search.SearchHit hit,
gr.uoa.di.madgik.grs.writer.RecordWriter<gr.uoa.di.madgik.grs.record.GenericRecord> rsWriter,
List<String> projections,
List<String> presentables,
int maxFragmentCount,
long rsTimeout)
throws gr.uoa.di.madgik.grs.writer.GRS2WriterException
- Throws:
gr.uoa.di.madgik.grs.writer.GRS2WriterException
initRSWriterForSearchHits
public static gr.uoa.di.madgik.grs.writer.RecordWriter<gr.uoa.di.madgik.grs.record.GenericRecord> initRSWriterForSearchHits(List<String> presentables,
List<String> projections,
org.gcube.indexmanagement.resourceregistry.RRadaptor adaptor)
throws org.gcube.indexmanagement.common.IndexException,
gr.uoa.di.madgik.grs.writer.GRS2WriterException
- Throws:
org.gcube.indexmanagement.common.IndexException
gr.uoa.di.madgik.grs.writer.GRS2WriterException
convertToLuceneQuery
public static org.gcube.indexmanagement.lucenewrapper.LuceneGcqlQueryContainer convertToLuceneQuery(String query,
List<String> presentables,
List<String> seachables,
org.gcube.indexmanagement.resourceregistry.RRadaptor rradaptor)
throws org.gcube.indexmanagement.common.IndexException
- Throws:
org.gcube.indexmanagement.common.IndexException
getLuceneQueryFromQueryString
public static String getLuceneQueryFromQueryString(org.gcube.indexmanagement.lucenewrapper.LuceneGcqlQueryContainer queryContainer)
throws org.gcube.indexmanagement.common.IndexException
- Throws:
org.gcube.indexmanagement.common.IndexException
getProjectionsQueryFromQueryString
public static List<String> getProjectionsQueryFromQueryString(org.gcube.indexmanagement.lucenewrapper.LuceneGcqlQueryContainer queryContainer)
throws org.gcube.indexmanagement.common.IndexException
- Throws:
org.gcube.indexmanagement.common.IndexException
Copyright © 2013. All Rights Reserved.