|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.search.datafusion.helpers.RecordHelper
public class RecordHelper
| Field Summary | |
|---|---|
static String |
ID_FIELD
|
static String |
objid
|
static String |
QUERY_FIELD
|
static String |
SCORE_FIELD
|
| Constructor Summary | |
|---|---|
RecordHelper()
|
|
| Method Summary | |
|---|---|
static String |
getQueryFieldContent(gr.uoa.di.madgik.grs.record.GenericRecord rec,
String snippetField)
Gets the payload of the snippetField from the rec. |
static String |
getQuerySnippetFields(gr.uoa.di.madgik.grs.record.GenericRecord rec,
List<String> snippetFields)
Gets the payload from either the snippetFields or from the actual payload. |
static Float |
getRank(gr.uoa.di.madgik.grs.record.GenericRecord rec)
Get the score field from the rec |
static String |
getRecordContentFromObjID(gr.uoa.di.madgik.grs.record.GenericRecord rec)
Getis the actual content of the rec. |
static String |
getRecordID(gr.uoa.di.madgik.grs.record.GenericRecord rec)
Gets the record id from the record. |
static String |
getSnippetPayload(gr.uoa.di.madgik.grs.record.GenericRecord rec,
String snippetField)
Gets the payload of the snippetField from the rec |
static gr.uoa.di.madgik.grs.record.GenericRecord |
luceneToRSRecord(org.apache.lucene.document.Document doc,
Set<String> fieldsName,
Float score)
Gets a GenericRecord from a lucene Document. |
static void |
rsRecToLucene(org.apache.lucene.index.IndexWriter w,
String id,
gr.uoa.di.madgik.grs.record.GenericRecord rsRec,
String queryField)
Converts and stores a GenericRecord to lucene. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String objid
public static final String QUERY_FIELD
public static final String ID_FIELD
public static final String SCORE_FIELD
| Constructor Detail |
|---|
public RecordHelper()
| Method Detail |
|---|
public static Float getRank(gr.uoa.di.madgik.grs.record.GenericRecord rec)
rec -
public static String getSnippetPayload(gr.uoa.di.madgik.grs.record.GenericRecord rec,
String snippetField)
throws gr.uoa.di.madgik.grs.record.GRS2RecordDefinitionException,
gr.uoa.di.madgik.grs.buffer.GRS2BufferException
rec - snippetField -
gr.uoa.di.madgik.grs.record.GRS2RecordDefinitionException
gr.uoa.di.madgik.grs.buffer.GRS2BufferException
public static String getRecordContentFromObjID(gr.uoa.di.madgik.grs.record.GenericRecord rec)
throws gr.uoa.di.madgik.grs.record.GRS2RecordDefinitionException,
gr.uoa.di.madgik.grs.buffer.GRS2BufferException,
MalformedURLException,
IOException
rec -
gr.uoa.di.madgik.grs.record.GRS2RecordDefinitionException
gr.uoa.di.madgik.grs.buffer.GRS2BufferException
MalformedURLException
IOException
public static String getRecordID(gr.uoa.di.madgik.grs.record.GenericRecord rec)
throws gr.uoa.di.madgik.grs.record.GRS2RecordDefinitionException,
gr.uoa.di.madgik.grs.buffer.GRS2BufferException,
MalformedURLException,
IOException
rec -
gr.uoa.di.madgik.grs.record.GRS2RecordDefinitionException
gr.uoa.di.madgik.grs.buffer.GRS2BufferException
MalformedURLException
IOException
public static String getQuerySnippetFields(gr.uoa.di.madgik.grs.record.GenericRecord rec,
List<String> snippetFields)
throws gr.uoa.di.madgik.grs.record.GRS2RecordDefinitionException,
gr.uoa.di.madgik.grs.buffer.GRS2BufferException,
MalformedURLException,
IOException
rec - snippetFields -
gr.uoa.di.madgik.grs.record.GRS2RecordDefinitionException
gr.uoa.di.madgik.grs.buffer.GRS2BufferException
MalformedURLException
IOException
public static String getQueryFieldContent(gr.uoa.di.madgik.grs.record.GenericRecord rec,
String snippetField)
throws gr.uoa.di.madgik.grs.record.GRS2RecordDefinitionException,
gr.uoa.di.madgik.grs.buffer.GRS2BufferException,
MalformedURLException,
IOException
getSnippetPayload(gr.uoa.di.madgik.grs.record.GenericRecord, java.lang.String)
rec - snippetField -
gr.uoa.di.madgik.grs.record.GRS2RecordDefinitionException
gr.uoa.di.madgik.grs.buffer.GRS2BufferException
MalformedURLException
IOException
public static void rsRecToLucene(org.apache.lucene.index.IndexWriter w,
String id,
gr.uoa.di.madgik.grs.record.GenericRecord rsRec,
String queryField)
throws Exception
GenericRecord to lucene.
queryField is the field where the query will be performed later.
w - id - rsRec - queryField -
Exception
public static gr.uoa.di.madgik.grs.record.GenericRecord luceneToRSRecord(org.apache.lucene.document.Document doc,
Set<String> fieldsName,
Float score)
throws Exception
GenericRecord from a lucene Document.
fieldsName is a collection with all the fields that we want to project from the record.
If a field is not contained in the record null is returned.
Typically, all the records that are returned will have the same fieldsName which is the union of all
the records that is constructed in feeding see IndexHelper.feedLucene(org.apache.lucene.store.Directory, java.util.Iterator, java.util.List, java.util.Set, int)
doc - fieldsName - score -
GenericRecord from the lucene Document
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||