|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.restlet.resource.Resource org.restlet.resource.UniformResource org.restlet.resource.ServerResource org.apache.solr.rest.schema.FieldResource
public class FieldResource
This class responds to requests at /solr/(corename)/schema/fields/(fieldname) where "fieldname" is the name of a field.
The GET method returns properties for the given fieldname. The "includeDynamic" query parameter, if specified, will cause the dynamic field matching the given fieldname to be returned if fieldname is not explicitly declared in the schema. The PUT method accepts field addition requests in JSON format.
Field Summary | |
---|---|
protected static String |
INCLUDE_DYNAMIC_PARAM
|
protected static String |
SHOW_DEFAULTS
|
Constructor Summary | |
---|---|
FieldResource()
|
Method Summary | |
---|---|
void |
doInit()
Pulls the "fl" param from the request and splits it to get the requested list of fields. |
org.restlet.representation.Representation |
get()
|
protected String |
getContentType()
|
protected SimpleOrderedMap<Object> |
getFieldProperties(SchemaField field)
Get the properties for a given field. |
protected LinkedHashSet<String> |
getRequestedFields()
|
protected IndexSchema |
getSchema()
|
protected SolrCore |
getSolrCore()
|
protected SolrQueryRequest |
getSolrRequest()
|
protected SolrQueryResponse |
getSolrResponse()
|
protected void |
handleException(org.slf4j.Logger log)
If there is an exception on the SolrResponse: error info is added to the SolrResponse; the response status code is set to the error code from the exception; and the exception message is added to the list of things to be logged. |
protected void |
handlePostExecution(org.slf4j.Logger log)
Deal with an exception on the SolrResponse, fill in response header info, and log the accumulated messages on the SolrResponse. |
org.restlet.representation.Representation |
put(org.restlet.representation.Representation entity)
Accepts JSON add field request, to URL |
protected static String |
urlDecode(String str)
Decode URL-encoded strings as UTF-8, and avoid converting "+" to space |
Methods inherited from class org.restlet.resource.ServerResource |
---|
abort, commit, delete, delete, describeVariants, doCatch, doConditionalHandle, doError, doHandle, doHandle, doNegotiatedHandle, get, getAttribute, getInfo, getInfo, getOnSent, getPreferredVariant, getVariants, getVariants, handle, hasAnnotations, head, head, isAnnotated, isAutoCommitting, isCommitted, isConditional, isExisting, isInRole, isNegotiated, options, options, post, post, put, redirectPermanent, redirectPermanent, redirectSeeOther, redirectSeeOther, redirectTemporary, redirectTemporary, setAllowedMethods, setAnnotated, setAttribute, setAutoCommitting, setChallengeRequests, setCommitted, setConditional, setCookieSettings, setDimensions, setExisting, setLocationRef, setLocationRef, setNegotiated, setOnSent, setProxyChallengeRequests, setServerInfo, setStatus, setStatus, setStatus, setStatus, updateAllowedMethods, updateDimensions |
Methods inherited from class org.restlet.resource.Resource |
---|
doError, doRelease, getAllowedMethods, getApplication, getChallengeRequests, getChallengeResponse, getClientInfo, getConditions, getConnegService, getContext, getConverterService, getCookies, getCookieSettings, getDimensions, getHostRef, getLocationRef, getLogger, getMatrix, getMatrixValue, getMaxForwards, getMetadataService, getMethod, getOriginalRef, getProtocol, getProxyChallengeRequests, getProxyChallengeResponse, getQuery, getQueryValue, getRanges, getReference, getReferrerRef, getRequest, getRequestAttributes, getRequestCacheDirectives, getRequestEntity, getResponse, getResponseAttributes, getResponseCacheDirectives, getResponseEntity, getRootRef, getServerInfo, getStatus, getStatusService, init, isConfidential, isLoggable, release, setApplication, setQueryValue, setRequest, setResponse, toObject, toRepresentation, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final String INCLUDE_DYNAMIC_PARAM
protected static final String SHOW_DEFAULTS
Constructor Detail |
---|
public FieldResource()
Method Detail |
---|
public void doInit() throws org.restlet.resource.ResourceException
org.restlet.resource.ResourceException
public org.restlet.representation.Representation get()
get
in interface GETable
get
in class org.restlet.resource.ServerResource
public org.restlet.representation.Representation put(org.restlet.representation.Representation entity)
put
in interface PUTable
put
in class org.restlet.resource.ServerResource
protected LinkedHashSet<String> getRequestedFields()
protected SimpleOrderedMap<Object> getFieldProperties(SchemaField field)
field
- not required to exist in the schemaprotected SolrCore getSolrCore()
protected IndexSchema getSchema()
protected SolrQueryRequest getSolrRequest()
protected SolrQueryResponse getSolrResponse()
protected String getContentType()
protected void handlePostExecution(org.slf4j.Logger log)
protected void handleException(org.slf4j.Logger log)
protected static String urlDecode(String str) throws UnsupportedEncodingException
UnsupportedEncodingException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |