|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.search.datafusion.DataFusion
public class DataFusion
| Constructor Summary | |
|---|---|
DataFusion(URI[] locators,
String query)
Instantiates data fusion for the records in the locators and the given query |
|
DataFusion(URI[] locators,
String query,
Integer count)
Instantiates data fusion for the records in the locators and the given query and returns up to the count records |
|
| Method Summary | |
|---|---|
URI |
operate()
|
URI |
rerank()
Wrapper for the static rerankRecords(java.util.Iterator |
static URI |
rerankRecords(Iterator<PositionalRecordWrapper> iter,
String query,
int count,
List<String> snippetFields,
Boolean includePosition)
Takes an iterator of PositionalRecordWrappers and puts them in a lucene index. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DataFusion(URI[] locators,
String query)
throws gr.uoa.di.madgik.grs.reader.GRS2ReaderException
locators - query -
gr.uoa.di.madgik.grs.reader.GRS2ReaderException
public DataFusion(URI[] locators,
String query,
Integer count)
throws gr.uoa.di.madgik.grs.reader.GRS2ReaderException
locators - query - count -
gr.uoa.di.madgik.grs.reader.GRS2ReaderException| Method Detail |
|---|
public URI operate()
throws Exception
Exception
public URI rerank()
throws Exception
rerankRecords(java.util.Iterator, java.lang.String, int, java.util.List, java.lang.Boolean)
Exception
public static URI rerankRecords(Iterator<PositionalRecordWrapper> iter,
String query,
int count,
List<String> snippetFields,
Boolean includePosition)
throws Exception
PositionalRecordWrappers and puts them in a lucene index. Then it performs the query to rerank the records and
returns the URI of the gRS of the result. The query is performed on an extra field that is either included the payload of the record field
in the list of snippetFields or the actual payload of the record (if none of the snippetFields are included in the record). The actual payload
is retrieved from the objectID field which is a URI (text extraction is used to parse the response).
After the records are reranked based on the query we can rearrange the results based on their initial position of each record by setting includePosition to true.
This rearrangement is done in RankedRecord.recalculateScores(java.util.Map, java.util.Map, java.lang.Boolean) and the actual calculation of the final score based on the lucene score and the initial position
is done in RankedRecord.calcScore(org.gcube.search.datafusion.datatypes.RankedRecord)
iter - query - count - snippetFields - includePosition -
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||