org.carrot2.source.boss
Class BossDocumentSource
java.lang.Object
org.carrot2.core.ProcessingComponentBase
org.carrot2.source.SearchEngineBase
org.carrot2.source.MultipageSearchEngine
org.carrot2.source.boss.BossDocumentSource
- All Implemented Interfaces:
- IDocumentSource, IProcessingComponent
public final class BossDocumentSource
- extends MultipageSearchEngine
A IDocumentSource fetching Documents (search results) from Yahoo BOSS.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
keepHighlights
public boolean keepHighlights
- Determines whether to keep the original query word highlights. Yahoo by default
highlights query words in search results using the <b> HTML tag. Set this
attribute to
true to keep these highlights.
- Attribute label:
- Keep highlights
- Attribute level:
- Advanced
- Attribute group:
- Postprocessing
service
public BossSearchService service
- The specific search service to be used by this document source. Use this attribute
to choose which BOSS's service to query, e.g. Web, News or Image search.
- Attribute label:
- Boss Search Service
- Attribute level:
- Advanced
- Attribute group:
- Service
BossDocumentSource
public BossDocumentSource()
process
public void process()
throws ProcessingException
- Run a single query.
- Specified by:
process in interface IProcessingComponent- Overrides:
process in class ProcessingComponentBase
- Throws:
ProcessingException - 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.
createFetcher
protected final Callable<SearchEngineResponse> createFetcher(MultipageSearchEngine.SearchRange bucket)
- Create a single page fetcher for the search range.
- Specified by:
createFetcher in class MultipageSearchEngine
- Parameters:
bucket - The search range to fetch.
afterFetch
protected void afterFetch(SearchEngineResponse response)
- Description copied from class:
SearchEngineBase
- Called after a single search engine response has been fetched. The concrete
implementation may want to override this empty implementation to e.g., clean or
otherwise postprocess the returned results.
- Overrides:
afterFetch in class SearchEngineBase
Copyright (c) Dawid Weiss, Stanislaw Osinski