[
https://issues.apache.org/jira/browse/SOLR-4503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13592122#comment-13592122
]
Steve Rowe commented on SOLR-4503:
----------------------------------
Thanks for the review, Yonik.
bq. It seems like there are multiple use-cases for the fields API...
{quote}
One just wants to get all the info/properties for a field, and they don't care
how that field is defined.
For example, they may want to look up field X to see if it's indexed, w/o
having to worry about if it's a "dynamic" field or not.
{quote}
I originally had code to do index lookup, but this API is about the schema, so
I took it out, thinking that index queries didn't belong.
bq. allowing the fields API to be used for dynamic fields also, but provide an
indicator about what pattern matched
In my current state I do have an "includeDynamic" query param for the
/schema/fields/fieldname request, to report the matching dynamic field
properties if fieldname isn't an explicitly declared field.
{quote}
One wants to get the actual definition definition in the schema (or as close to
that as possible), and they would expect to see something very close to what
they defined (or sent in using the fields API to create a new field). Showing
all possible field properties like "storeOffsetsWithPositions" are going to be
potentially confusing since people won't know what they mean and when/why they
have to specify them when creating new fields.
{quote}
bq. only returning non-default properties... so if you create an integer field
with "indexed=true", that's pretty much all you get back.
bq. having a parameter to allow requesting all "look through" properties.
Good idea, I'll do this.
{quote}
Also related: SOLR-4210
We should aim for being able to hit any node in the cluster w/o worrying about
which nodes are hosting which collections.
{quote}
Skimming Mark's patch modifying SolrDispatchFilter, I think the schema REST
requests will already be proxied, but I'll test to be sure.
bq. We should probably also default to indented JSON output.
OK, I'll switch to that.
> 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: all.dynamic.fields.json, all.fields.json,
> all.field.types.json, coordinate.dynamic.field.json, date.field.type.json,
> price.field.json, SOLR-4503.patch, 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: [email protected]
For additional commands, e-mail: [email protected]