| 1 | |
|
| 2 | |
|
| 3 | |
package org.galagosearch.core.retrieval; |
| 4 | |
|
| 5 | |
import java.io.IOException; |
| 6 | |
import org.galagosearch.core.retrieval.query.Node; |
| 7 | |
import org.galagosearch.core.retrieval.structured.StructuredRetrieval; |
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | 12 | public abstract class Retrieval { |
| 16 | |
public abstract String getDocumentName(int document) throws IOException; |
| 17 | |
|
| 18 | |
|
| 19 | |
|
| 20 | |
|
| 21 | |
public abstract Node transformQuery(Node query) throws Exception; |
| 22 | |
public abstract ScoredDocument[] runQuery(Node query, int requested) throws Exception; |
| 23 | |
public abstract void close() throws IOException; |
| 24 | |
|
| 25 | |
static public Retrieval instance(String indexPath) throws IOException { |
| 26 | 0 | return new StructuredRetrieval(indexPath); |
| 27 | |
} |
| 28 | |
} |