Save This Page
Home » nutch-1.0 » org.apache.nutch » searcher » [javadoc | source]
org.apache.nutch.searcher
public class: NutchBean [javadoc | source]
java.lang.Object
   org.apache.nutch.searcher.NutchBean

All Implemented Interfaces:
    HitInlinks, SegmentBean, Closeable, SearchBean

One stop shopping for search-related functionality.
Nested Class Summary:
public static class  NutchBean.NutchBeanConstructor  Responsible for constructing a NutchBean singleton instance and caching it in the servlet context. This class should be registered in the deployment descriptor as a listener 
Field Summary
public static final  Log LOG     
public static final  String KEY     
Constructor:
 public NutchBean(Configuration conf) throws IOException 
    Parameters:
    conf -
    Throws:
    IOException -
 public NutchBean(Configuration conf,
    Path dir) throws IOException 
    Construct in a named directory.
    Parameters:
    conf -
    dir -
    Throws:
    IOException -
Method from org.apache.nutch.searcher.NutchBean Summary:
close,   get,   getAnchors,   getContent,   getDetails,   getDetails,   getExplanation,   getFetchDate,   getInlinks,   getParseData,   getParseText,   getProtocolVersion,   getSegmentNames,   getSummary,   getSummary,   main,   ping,   readAddresses,   readConfig,   search,   search,   search,   search,   search
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.nutch.searcher.NutchBean Detail:
 public  void close() throws IOException 
 public static NutchBean get(ServletContext app,
    Configuration conf) throws IOException 
    Returns the cached instance in the servlet context.
 public String[] getAnchors(HitDetails hit) throws IOException 
 public byte[] getContent(HitDetails hit) throws IOException 
 public HitDetails getDetails(Hit hit) throws IOException 
 public HitDetails[] getDetails(Hit[] hits) throws IOException 
 public String getExplanation(Query query,
    Hit hit) throws IOException 
 public long getFetchDate(HitDetails hit) throws IOException 
 public Inlinks getInlinks(HitDetails hit) throws IOException 
 public ParseData getParseData(HitDetails hit) throws IOException 
 public ParseText getParseText(HitDetails hit) throws IOException 
 public long getProtocolVersion(String className,
    long clientVersion) throws IOException 
 public String[] getSegmentNames() throws IOException 
 public Summary getSummary(HitDetails hit,
    Query query) throws IOException 
 public Summary[] getSummary(HitDetails[] hits,
    Query query) throws IOException 
 public static  void main(String[] args) throws Exception 
    For debugging.
 public boolean ping() 
 public static List readAddresses(Path path,
    Configuration conf) throws IOException 
 public static List readConfig(Path path,
    Configuration conf) throws IOException 
 public Hits search(Query query,
    int numHits) throws IOException 
 public Hits search(Query query,
    int numHits,
    int maxHitsPerDup) throws IOException 
    Search for pages matching a query, eliminating excessive hits from the same site. Hits after the first maxHitsPerDup from the same site are removed from results. The remaining hits have Hit#moreFromDupExcluded() set.

    If maxHitsPerDup is zero then all hits are returned.

 public Hits search(Query query,
    int numHits,
    int maxHitsPerDup,
    String dedupField) throws IOException 
    Search for pages matching a query, eliminating excessive hits with matching values for a named field. Hits after the first maxHitsPerDup are removed from results. The remaining hits have Hit#moreFromDupExcluded() set.

    If maxHitsPerDup is zero then all hits are returned.

 public Hits search(Query query,
    int numHits,
    String dedupField,
    String sortField,
    boolean reverse) throws IOException 
 public Hits search(Query query,
    int numHits,
    int maxHitsPerDup,
    String dedupField,
    String sortField,
    boolean reverse) throws IOException 
    Search for pages matching a query, eliminating excessive hits with matching values for a named field. Hits after the first maxHitsPerDup are removed from results. The remaining hits have Hit#moreFromDupExcluded() set.

    If maxHitsPerDup is zero then all hits are returned.