public abstract class AbstractFederateSearchConnector extends java.lang.Object implements FederateSearchConnector
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
baseurl |
java.lang.String |
instancename |
long |
lastaccesstime |
protected SchemaConfiguration |
localcfg |
Constructor and Description |
---|
AbstractFederateSearchConnector() |
Modifier and Type | Method and Description |
---|---|
boolean |
init(java.lang.String instance,
java.lang.String cfgFileName)
Inits the connector with the remote field names and matches to yacy
schema and other specific settings from config file.
|
void |
search(SearchEvent theSearch)
queries a remote system and adds the results to the searchevent and to
the crawler if addResultsToLocalIndex is true
|
protected URIMetadataNode |
toYaCySchema(SolrDocument doc)
Converts a remote schema result to YaCy schema using the fieldname
mapping provided as config file
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
query
public java.lang.String instancename
protected SchemaConfiguration localcfg
public long lastaccesstime
protected java.lang.String baseurl
public boolean init(java.lang.String instance, java.lang.String cfgFileName)
init
in interface FederateSearchConnector
instanceName
- internal namecfgFileName
- e.g. DATA/SETTINGS/FEDERATECFG/instanceName.SCHEMApublic void search(SearchEvent theSearch)
search
in interface FederateSearchConnector
theSearch
- receiving the resultsprotected URIMetadataNode toYaCySchema(SolrDocument doc) throws java.net.MalformedURLException
remote
- result (with remote fieldnames)java.net.MalformedURLException