lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Risden (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-9666) Extract dynamic fields in LukeResponse
Date Thu, 20 Oct 2016 13:49:58 GMT

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

Kevin Risden commented on SOLR-9666:
------------------------------------

Since it seems like you are just looking for schema information, maybe the schema api would
be useful?

https://cwiki.apache.org/confluence/display/solr/Schema+API#SchemaAPI-RetrieveSchemaInformation

> Extract dynamic fields in LukeResponse
> --------------------------------------
>
>                 Key: SOLR-9666
>                 URL: https://issues.apache.org/jira/browse/SOLR-9666
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: SolrJ
>    Affects Versions: 6.2.1
>            Reporter: Fengtan
>            Priority: Minor
>         Attachments: SOLR-9666.patch
>
>
> LukeRequestHandler (/admin/luke), when invoked with the show=schema parameter, returns
a list static fields and dynamic fields.
> For instance on my local machine http://localhost:8983/solr/collection1/admin/luke?show=schema
returns something like this:
> {code:xml}
> <response>
>   ...
>   <lst name="schema">
>     <lst name="fields">
>       <lst name="foo">
>         <str name="type">string</str>
>         <str name="flags">I-S-----OF-----l</str>
>       </lst>
>       ...
>     </lst>
>     <lst name="dynamicFields">
>       <lst name="bar_*">
>         <str name="type">string</str>
>         <str name="flags">I-------OF------</str>
>       </lst>
>       ...
>     </lst>
>   </lst>
>   ...
> </response>
> {code}
> However, when processing a LukeRequest in SolrJ, only static fields are parsed and made
available to the client application through lukeResponse.getFieldInfo(). There does not seem
to be a way for the client application to get the dynamic fields.
> Maybe we could parse dynamic fields and make them accessible ? Possibly something like
this:
> {code}
> public class MyClass {
>   public static void main(String[] args) throws Exception {
>     SolrClient client = new HttpSolrClient("http://localhost:8983/solr/collection1");
>     LukeRequest request = new LukeRequest();
>     request.setShowSchema(true);
>     LukeResponse response = request.process(client);
>     Map<String, FieldInfo> staticFields = response.getFieldInfo(); // SolrJ already
provides this.
>     Map<String, FieldInfo> dynamicFields = response.getDynamicFieldInfo(); // Proposed
improvement.
>   }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message