org.carrot2.source.microsoft
Class Bing2WebDocumentSource
java.lang.Object
org.carrot2.core.ProcessingComponentBase
org.carrot2.source.SearchEngineBase
org.carrot2.source.MultipageSearchEngine
org.carrot2.source.microsoft.Bing2DocumentSource
org.carrot2.source.microsoft.Bing2WebDocumentSource
- All Implemented Interfaces:
- IDocumentSource, IProcessingComponent
public class Bing2WebDocumentSource
- extends Bing2DocumentSource
Web search specific document source fetching from Bing using Bing2 API.
|
Method Summary |
protected void |
appendSourceParams(ArrayList<org.apache.http.NameValuePair> params)
Append any source-specific parameters. |
void |
process()
Process the query. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
webOptions
public String webOptions
- Miscellaneous Web-request specific options. Bing provides the following options:
- DisableHostCollapsing
- DisableQueryAlterations
Options should be space-separated.
- Attribute label:
- Web request options
- Attribute level:
- Advanced
- Attribute group:
- Miscellaneous
fileTypes
public String fileTypes
- Specify the allowed file types. Space-separated list of file extensions (upper-case).
See Bing documentation.
- Attribute label:
- File types
- Attribute level:
- Advanced
- Attribute group:
- Results filtering
site
public String site
- Site restriction to return results under a given URL.
Example: http://www.wikipedia.com or simply wikipedia.com.
- Attribute label:
- Site restriction
- Attribute level:
- Advanced
- Attribute group:
- Results filtering
Bing2WebDocumentSource
public Bing2WebDocumentSource()
- Initialize source type properly.
process
public void process()
throws ProcessingException
- Process the query.
- Specified by:
process in interface IProcessingComponent- Specified by:
process in class Bing2DocumentSource
- 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.
appendSourceParams
protected void appendSourceParams(ArrayList<org.apache.http.NameValuePair> params)
- Description copied from class:
Bing2DocumentSource
- Append any source-specific parameters.
- Overrides:
appendSourceParams in class Bing2DocumentSource
Copyright (c) Dawid Weiss, Stanislaw Osinski