gr.uoa.di.madgik.searchlibrary.operatorlibrary.indexfuse
Class IndexFuseOp

java.lang.Object
  extended by gr.uoa.di.madgik.searchlibrary.operatorlibrary.indexfuse.IndexFuseOp

public class IndexFuseOp
extends Object

Operator class used to perform a fuse operation on its input org.gcube.searchservice.searchlibrary.resultset.ResultSet, that represent results produced from full text index lookup operations on a set of collections, and produces an output org.gcube.searchservice.searchlibrary.resultset.ResultSet holding the joined results. For each collection the input comes from metadata and content collections that correspond to that collection. The output contains 0 or 1 result for each OID of the input collections.

Author:
UoA

Field Summary
static String CollectionFieldNameDef
          The default name of the Field the collection will be stored to
static String ObjectIdFieldNameDef
          The default name of the Field the object id will be stored to
static String RankFieldNameDef
          The default name of the Field the rank will be stored to
 
Constructor Summary
IndexFuseOp(URI[] contentLocators, URI[][] metaLocators, String[] colIDs, StatsContainer stats)
          Creates a new IndexFuseOp with the default field names and the default timeout
IndexFuseOp(URI[] contentLocators, URI[][] metaLocators, String[] colIDs, String objectIdFieldName, String collectionFieldName, String rankFieldName, long timeout, TimeUnit timeUnit, StatsContainer stats)
          Creates a new IndexFuseOp with configurable field names and timeout
IndexFuseOp(URI[] contentLocators, URI[][] metaLocators, String[] colIDs, String objectIdFieldName, String collectionFieldName, String rankFieldName, StatsContainer stats)
          Creates a new IndexFuseOp with configurable field names and the default timeout
 
Method Summary
 URI compute()
          Performs the fuse operation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ObjectIdFieldNameDef

public static String ObjectIdFieldNameDef
The default name of the Field the object id will be stored to


CollectionFieldNameDef

public static String CollectionFieldNameDef
The default name of the Field the collection will be stored to


RankFieldNameDef

public static String RankFieldNameDef
The default name of the Field the rank will be stored to

Constructor Detail

IndexFuseOp

public IndexFuseOp(URI[] contentLocators,
                   URI[][] metaLocators,
                   String[] colIDs,
                   StatsContainer stats)
            throws Exception
Creates a new IndexFuseOp with the default field names and the default timeout

Parameters:
contentLocators - The content collection inputs org.gcube.searchservice.searchlibrary.resultset.ResultSet
metaLocators - The metadata collection inputs org.gcube.searchservice.searchlibrary.resultset.ResultSet
colIDs -
stats - statistics
Throws:
Exception

IndexFuseOp

public IndexFuseOp(URI[] contentLocators,
                   URI[][] metaLocators,
                   String[] colIDs,
                   String objectIdFieldName,
                   String collectionFieldName,
                   String rankFieldName,
                   StatsContainer stats)
            throws Exception
Creates a new IndexFuseOp with configurable field names and the default timeout

Parameters:
contentLocators - The content collection inputs org.gcube.searchservice.searchlibrary.resultset.ResultSet
metaLocators - The metadata collection inputs org.gcube.searchservice.searchlibrary.resultset.ResultSet
colIDs -
objectIdFieldName - The name of the Field the object id will be stored to
collectionFieldName - The name of the Field the collection will be stored to
rankFieldName - The name of the Field the rank will be stored to
stats - statistics
Throws:
Exception

IndexFuseOp

public IndexFuseOp(URI[] contentLocators,
                   URI[][] metaLocators,
                   String[] colIDs,
                   String objectIdFieldName,
                   String collectionFieldName,
                   String rankFieldName,
                   long timeout,
                   TimeUnit timeUnit,
                   StatsContainer stats)
            throws Exception
Creates a new IndexFuseOp with configurable field names and timeout

Parameters:
contentLocators - The content collection inputs org.gcube.searchservice.searchlibrary.resultset.ResultSet
metaLocators - The metadata collection inputs org.gcube.searchservice.searchlibrary.resultset.ResultSet
colIDs -
objectIdFieldName - The name of the Field the object id will be stored to
collectionFieldName - The name of the Field the collection will be stored to
rankFieldName - The name of the Field the rank will be stored to
timeout - The timeout that will be used by all IRecordReaders and the IRecordWriter
timeUnit - The time unit of the timeout
stats - statistics
Throws:
Exception
Method Detail

compute

public URI compute()
            throws Exception
Performs the fuse operation

Returns:
The locator of the results
Throws:
Exception - An unrecoverable for the operation error occured


Copyright © 2013. All Rights Reserved.