org.apache.nutch.searcher.response
Class SearchServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.apache.nutch.searcher.response.SearchServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class SearchServlet
extends javax.servlet.http.HttpServlet

Servlet that allows returning search results in multiple different formats through a ResponseWriter Nutch extension point.

See Also:
ResponseWriter, Serialized Form

Field Summary
static String DEDUPE
           
static String FIELDS
           
static String LANG
           
static org.apache.commons.logging.Log LOG
           
static String NUM_DUPES
           
static String QUERY
           
static String RESPONSE_TYPE
           
static String REVERSE
           
static String ROWS
           
static String SORT
           
static String START
           
static String SUMMARY
           
 
Constructor Summary
SearchServlet()
           
 
Method Summary
protected  void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handles all search requests.
protected  void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Forwards all responses to doGet.
 void init(javax.servlet.ServletConfig config)
          Initializes servlet configuration default values.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG

RESPONSE_TYPE

public static final String RESPONSE_TYPE
See Also:
Constant Field Values

QUERY

public static final String QUERY
See Also:
Constant Field Values

LANG

public static final String LANG
See Also:
Constant Field Values

START

public static final String START
See Also:
Constant Field Values

ROWS

public static final String ROWS
See Also:
Constant Field Values

SORT

public static final String SORT
See Also:
Constant Field Values

REVERSE

public static final String REVERSE
See Also:
Constant Field Values

DEDUPE

public static final String DEDUPE
See Also:
Constant Field Values

NUM_DUPES

public static final String NUM_DUPES
See Also:
Constant Field Values

SUMMARY

public static final String SUMMARY
See Also:
Constant Field Values

FIELDS

public static final String FIELDS
See Also:
Constant Field Values
Constructor Detail

SearchServlet

public SearchServlet()
Method Detail

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Initializes servlet configuration default values. Gets NutchBean and ResponseWriters.

Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException

doPost

protected void doPost(javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse response)
               throws javax.servlet.ServletException,
                      IOException
Forwards all responses to doGet.

Overrides:
doPost in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
IOException

doGet

protected void doGet(javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response)
              throws javax.servlet.ServletException,
                     IOException
Handles all search requests. Gets parameter input. Does the search and gets Hits, details, and summaries. Passes off to ResponseWriter classes to writer different output formats directly to HttpServletResponse.

Overrides:
doGet in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
IOException


Copyright © 2006 The Apache Software Foundation