websphinx.searchengine
Class HotBot

java.lang.Object
  |
  +--websphinx.searchengine.HotBot
All Implemented Interfaces:
Classifier, SearchEngine, java.io.Serializable

public class HotBot
extends java.lang.Object
implements SearchEngine

HotBot search engine.


Field Summary
static float priority
          Priority of this classifier.
 
Constructor Summary
HotBot()
           
 
Method Summary
 void classify(Page page)
          Classify a page.
 float getPriority()
          Get priority of this classifier.
 int getResultsPerPage()
          Get number of results per page for this search engine.
 java.net.URL makeQuery(java.lang.String keywords)
          Make a query URL for HotBot.
static Search search(java.lang.String keywords)
          Search HotBot.
static Search search(java.lang.String keywords, int maxResults)
          Search HotBot.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

priority

public static final float priority
Priority of this classifier.

Constructor Detail

HotBot

public HotBot()
Method Detail

classify

public void classify(Page page)
Classify a page. Sets the following labels:
Name Type Meaning
searchengine.source Page label HotBot object that labeled this page
searchengine.count Page field Number of results on page
searchengine.results Page fields Array of results. Each result region contains subfields: rank, title, description, and link.
searchengine.more-results Link label Link to a page containing more results.

Specified by:
classify in interface Classifier
Following copied from interface: websphinx.Classifier
Parameters:
page - Page to classify

getPriority

public float getPriority()
Get priority of this classifier.

Specified by:
getPriority in interface Classifier
Returns:
priority.

makeQuery

public java.net.URL makeQuery(java.lang.String keywords)
Make a query URL for HotBot.

Specified by:
makeQuery in interface SearchEngine
Parameters:
keywords - list of keywords, separated by spaces
Returns:
URL that submits the keywords to HotBot.

getResultsPerPage

public int getResultsPerPage()
Get number of results per page for this search engine.

Specified by:
getResultsPerPage in interface SearchEngine
Returns:
typical number of results per page

search

public static Search search(java.lang.String keywords)
Search HotBot.

Parameters:
keywords - list of keywords, separated by spaces
Returns:
enumeration of SearchEngineResults returned by a HotBot query constructed from the keywords.

search

public static Search search(java.lang.String keywords,
                            int maxResults)
Search HotBot.

Parameters:
keywords - list of keywords, separated by spaces
maxResults - maximum number of results to return
Returns:
enumeration of SearchEngineResults returned by an HotBot query constructed from the keywords. The enumeration yields at most maxResults objects.