elasticsearchindex.helpers
Class QueryParser

java.lang.Object
  extended by elasticsearchindex.helpers.QueryParser

public class QueryParser
extends Object


Constructor Summary
QueryParser()
           
 
Method Summary
static FullTextIndexType addFullTextIndexTypeIntoCache(String indexTypeStr, String scope, FullTextIndexType indexType, FTNodeCache cache)
           
static gr.uoa.di.madgik.grs.record.field.FieldDefinition[] createFieldDefinition(List<String> presentable, List<String> projections)
           
static String createIndexTypekey(String indexType, String scope)
           
static List<String> createPresentableForIndexTypes(Map<String,List<String>> presentableFieldsPerIndexType, 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(String queryString)
           
static List<String> getProjectionsQueryFromQueryString(String queryString)
           
static gr.uoa.di.madgik.grs.writer.RecordWriter<gr.uoa.di.madgik.grs.record.GenericRecord> initRSWriterForSearchHits(List<String> presentables, List<String> projections)
           
static boolean isDescendant(String descendantFieldName, IndexField parentField)
          A method used to check if one field is the descendant of another.
static FullTextIndexType retrieveIndexType(String indexTypeStr, org.gcube.common.core.scope.GCUBEScope gcubeScope, FTNodeCache cache)
           
static 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
 

Constructor Detail

QueryParser

public QueryParser()
Method Detail

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)

getCollectionsIDFromQuery

public static List<String> getCollectionsIDFromQuery(String queryString)

getLuceneQueryFromQueryString

public static String getLuceneQueryFromQueryString(String queryString)

getProjectionsQueryFromQueryString

public static List<String> getProjectionsQueryFromQueryString(String queryString)

createFieldDefinition

public static gr.uoa.di.madgik.grs.record.field.FieldDefinition[] createFieldDefinition(List<String> presentable,
                                                                                        List<String> projections)
                                                                                 throws Exception
Throws:
Exception

isDescendant

public static boolean isDescendant(String descendantFieldName,
                                   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 FullTextIndexType retrieveIndexType(String indexTypeStr,
                                                  String scope,
                                                  FTNodeCache cache)

retrieveIndexType

public static FullTextIndexType retrieveIndexType(String indexTypeStr,
                                                  org.gcube.common.core.scope.GCUBEScope gcubeScope,
                                                  FTNodeCache cache)

addFullTextIndexTypeIntoCache

public static FullTextIndexType addFullTextIndexTypeIntoCache(String indexTypeStr,
                                                              String scope,
                                                              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)
                                                                                                                     throws IndexException,
                                                                                                                            gr.uoa.di.madgik.grs.writer.GRS2WriterException
Throws:
IndexException
gr.uoa.di.madgik.grs.writer.GRS2WriterException


Copyright © 2013. All Rights Reserved.