You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Steve Rowe (JIRA)" <ji...@apache.org> on 2013/02/25 19:42:13 UTC

[jira] [Commented] (SOLR-4503) Add REST API methods to get schema information: fields, dynamic fields, and field types

    [ https://issues.apache.org/jira/browse/SOLR-4503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13586112#comment-13586112 ] 

Steve Rowe commented on SOLR-4503:
----------------------------------

The patch adds two dependencies: Restlet and the Restlet servlet extension.  All REST methods are implemented as Restlet ServerResource subclasses, which delegate to new self-reporting methods on IndexField and FieldType, the implementation of which was inspired by/stolen from LukeRequestHandler.

SolrDispatchFilter figures out the core, creates a SolrRequest and a SolrResponse, sets them on SolrRequestInfo's thread local, then passes the request (via filter chaining or request forwarding) to the Restlet servlet defined to handle schema requests.  Based on the URL path, the Restlet servlet's router then sends the request to the appropriate ServerResource subclass, where the response is filled in.

There is no RequestHandler involved in servicing these requests.

I've turned off Restlet's content negotiation facilities in favor of using Solr's wt parameter to specify the ResponseWriter.

At present, both GET and HEAD requests work for all six requests.  (Restlet uses GET methods to service HEAD requests, so there was very little coding required to do this.)

                
> Add REST API methods to get schema information: fields, dynamic fields, and field types
> ---------------------------------------------------------------------------------------
>
>                 Key: SOLR-4503
>                 URL: https://issues.apache.org/jira/browse/SOLR-4503
>             Project: Solr
>          Issue Type: Sub-task
>          Components: Schema and Analysis
>    Affects Versions: 4.1
>            Reporter: Steve Rowe
>            Assignee: Steve Rowe
>         Attachments: SOLR-4503.patch
>
>
> Add REST methods that provide properties for fields, dynamic fields, and field types, using paths:
> /solr/(corename)/schema/fields
> /solr/(corename)/schema/fields/fieldname
> /solr/(corename)/schema/dynamicfields
> /solr/(corename)/schema/dynamicfields/pattern
> /solr/(corename)/schema/fieldtypes
> /solr/(corename)/schema/fieldtypes/typename 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org