websphinx.searchengine
Class SearchEngineResult

java.lang.Object
  |
  +--websphinx.Region
        |
        +--websphinx.searchengine.SearchEngineResult

public class SearchEngineResult
extends Region

Result returned by a search engine query, identifying a Web page that matches the query.


Field Summary
 java.lang.String description
          Short description of page as reported by search engine.
 Link link
          Link to the actual page.
 int rank
          Relevancy rank of page in search engine's ordering.
 double score
          Relevancy score of page, by search engine's scale.
 SearchEngine searchengine
          Search engine that produced this hit.
 java.lang.String title
          Title of page as reported by search engine, or null if not provided
 
Fields inherited from class websphinx.Region
end, names, source, start, TRUE
 
Constructor Summary
SearchEngineResult(Region result)
          Make a SearchEngineResult.
 
Method Summary
 java.lang.String toString()
          Gets region as raw content.
 
Methods inherited from class websphinx.Region
enumerateObjectLabels, findEnd, findStart, getEnd, getField, getFields, getLabel, getLabel, getLength, getNumericLabel, getObjectLabel, getObjectLabels, getRootElement, getSource, getStart, hasAllLabels, hasAllLabels, hasAnyLabels, hasAnyLabels, hasLabel, removeLabel, setField, setFields, setLabel, setLabel, setObjectLabel, span, toHTML, toTags, toText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

rank

public int rank
Relevancy rank of page in search engine's ordering. In other words, rank=1 is the first result the search engine returned. If search engine results are not explicitly numbered, then rank may be 0.


score

public double score
Relevancy score of page, by search engine's scale. If search engine does not provide a score, the score defaults to 0.0.


title

public java.lang.String title
Title of page as reported by search engine, or null if not provided


description

public java.lang.String description
Short description of page as reported by search engine. Typically the first few words of the page. If not provided, description is null.


link

public Link link
Link to the actual page.


searchengine

public SearchEngine searchengine
Search engine that produced this hit.

Constructor Detail

SearchEngineResult

public SearchEngineResult(Region result)
Make a SearchEngineResult.

Parameters:
result - Region of a search engine's results page. Should be annotated with rank, title, description, and link fields.
Method Detail

toString

public java.lang.String toString()
Description copied from class: Region
Gets region as raw content.

Overrides:
toString in class Region
Following copied from class: websphinx.Region
Returns:
string representation of the region