@Bindable(prefix="IdolDocumentSource") public class IdolDocumentSource extends MultipageSearchEngine
IDocumentSource fetching Documents (search results) from an IDOL
Search Engine. Please note that you will need to install an XSLT stylesheet in your
IDOL instance that transforms the search results into the OpenSearch format. The XSLT
stylesheet is available under the org.carrot2.source.idol package, next to
the binaries of this class.
Based on code donated by Julien Nioche. Autonomy IDOL support contributed by James Sealey.
MultipageSearchEngine.SearchEngineResponseCallable, MultipageSearchEngine.SearchMode, MultipageSearchEngine.SearchRange| Modifier and Type | Field and Description |
|---|---|
String |
idolServerName
URL of the IDOL Server.
|
int |
idolServerPort
IDOL Server Port.
|
int |
maximumResults
Maximum number of results.
|
int |
minScore
Minimum IDOL Score.
|
String |
otherSearchAttributes
Any other search attributes (separated by &) from the Autonomy Query Search
API's Ensure all the attributes are entered to satisfy XSL that will be applied.
|
int |
resultsPerPage
Results per page.
|
String |
userAgent
User agent header.
|
String |
userName
User name to use for authentication.
|
String |
xslTemplateName
IDOL XSL Template Name.
|
searchModecompressed, documents, POSTPROCESSING, query, results, resultsTotal, SERVICE, start, statistics| Constructor and Description |
|---|
IdolDocumentSource() |
| Modifier and Type | Method and Description |
|---|---|
void |
beforeProcessing()
Invoked after the attributes marked with
Processing and Input
annotations have been bound, but before a call to IProcessingComponent.process(). |
protected Callable<SearchEngineResponse> |
createFetcher(MultipageSearchEngine.SearchRange bucket)
Subclasses should override this method and return a
Callable instance that
fetches search results in the given range. |
void |
process()
Performs the processing required to fulfill the request.
|
collectDocuments, process, runQueryafterFetch, clean, urlEncodeafterProcessing, dispose, getContext, getSharedExecutor, initclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitafterProcessing, dispose, init@Input @Processing @Attribute @Required @Label(value="IDOL server address") @Level(value=BASIC) @Group(value="Service") public String idolServerName
@Input @Processing @Attribute @Required @Label(value="IDOL server port") @Level(value=BASIC) @Group(value="Service") public int idolServerPort
@Input @Processing @Attribute @Required @Label(value="IDOL XSL template name") @Level(value=ADVANCED) @Group(value="Service") public String xslTemplateName
@Input @Processing @Attribute @Label(value="Other IDOLSearch attributes") @Level(value=ADVANCED) @Group(value="Service") public String otherSearchAttributes
@Input @Processing @Attribute @Required @IntRange(min=1) @Label(value="Results per page") @Level(value=ADVANCED) @Group(value="Service") public int resultsPerPage
@Input @Processing @Attribute @IntRange(min=1) @Label(value="Minimum score") @Level(value=BASIC) @Group(value="Service") public int minScore
@Input @Processing @Attribute @IntRange(min=1) @Label(value="Maximum results") @Level(value=BASIC) @Group(value="Service") public int maximumResults
@Input @Processing @Attribute @Label(value="User agent") @Level(value=ADVANCED) @Group(value="Service") public String userAgent
null value is provided, the
following User-Agent will be sent:
Rome Client (http://tinyurl.com/64t5n) Ver: UNKNOWN.@Input @Processing @Attribute @Label(value="User name") @Level(value=MEDIUM) @Group(value="Service") public String userName
public void beforeProcessing()
IProcessingComponentProcessing and Input
annotations have been bound, but before a call to IProcessingComponent.process(). In this
method, the processing component should perform any initializations based on the
runtime attributes. This method is called once per request.beforeProcessing in interface IProcessingComponentbeforeProcessing in class ProcessingComponentBasepublic void process()
throws ProcessingException
IProcessingComponentprocess in interface IProcessingComponentprocess in class ProcessingComponentBaseProcessingException - when processing failed. If thrown, the
IProcessingComponent.afterProcessing() method will be called and the component will
be ready to accept further requests or to be disposed of. Finally, the
exception will be rethrown from the controller method that caused the
component to perform processing.protected Callable<SearchEngineResponse> createFetcher(MultipageSearchEngine.SearchRange bucket)
MultipageSearchEngineCallable instance that
fetches search results in the given range.
Note the query (if any is required) should be passed at the concrete class level. We are not concerned with it here.
createFetcher in class MultipageSearchEnginebucket - The search range to fetch.