public class SolrDispatchFilter extends Object
Modifier and Type | Field and Description |
---|---|
protected String |
abortErrorMessage |
protected CoreContainer |
cores |
protected org.apache.http.client.HttpClient |
httpClient |
protected String |
pathPrefix |
Constructor and Description |
---|
SolrDispatchFilter() |
Modifier and Type | Method and Description |
---|---|
protected CoreContainer |
createCoreContainer()
Override this to change CoreContainer initialization
|
void |
destroy() |
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain) |
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain,
boolean retry) |
protected void |
execute(javax.servlet.http.HttpServletRequest req,
SolrRequestHandler handler,
SolrQueryRequest sreq,
SolrQueryResponse rsp) |
CoreContainer |
getCores() |
String |
getPathPrefix() |
void |
init(javax.servlet.FilterConfig config) |
protected void |
sendError(SolrCore core,
SolrQueryRequest req,
javax.servlet.ServletRequest request,
javax.servlet.http.HttpServletResponse response,
Throwable ex) |
void |
setPathPrefix(String pathPrefix)
Set the prefix for all paths.
|
protected volatile CoreContainer cores
protected String pathPrefix
protected String abortErrorMessage
protected final org.apache.http.client.HttpClient httpClient
public void init(javax.servlet.FilterConfig config) throws javax.servlet.ServletException
javax.servlet.ServletException
protected CoreContainer createCoreContainer()
public CoreContainer getCores()
public void destroy()
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain, boolean retry) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
protected void execute(javax.servlet.http.HttpServletRequest req, SolrRequestHandler handler, SolrQueryRequest sreq, SolrQueryResponse rsp)
protected void sendError(SolrCore core, SolrQueryRequest req, javax.servlet.ServletRequest request, javax.servlet.http.HttpServletResponse response, Throwable ex) throws IOException
IOException
public void setPathPrefix(String pathPrefix)
<filter-mapping>
<filter-name>SolrRequestFilter</filter-name>
<url-pattern>/xxx/*</url-pattern>
</filter-mapping>
Make sure to set the PathPrefix to "/xxx" either with this function
or in web.xml.
<init-param>
<param-name>path-prefix</param-name>
<param-value>/xxx</param-value>
</init-param>
public String getPathPrefix()
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.